Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase PHP version requirement to 8.2 #1506

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build-and-test:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -44,6 +44,11 @@ jobs:
CI_COMMIT_SHORT_SHA=$(echo $CI_COMMIT_SHA | head -c8)
./bin/platform self:build --no-composer-rebuild --yes --replace-version "$CI_COMMIT_REF_NAME"-"$CI_COMMIT_SHORT_SHA" --output platform.phar

- name: Run PHPUnit tests
run: |
composer install --no-interaction --no-scripts
./scripts/test/unit.sh

- name: Set up Go
uses: actions/setup-go@v4
with:
Expand All @@ -61,10 +66,3 @@ jobs:
with:
name: cli-phar
path: platform.phar

# TODO run these when upgraded for PHP 8+ compatibility
# - name: Run unit tests
# run: |
# # Install PHPUnit
# composer install --no-interaction --no-scripts
# ./scripts/test/unit.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.idea/
/release-changelog*.md
/local-php-security-checker
/.phpunit.result.cache
2 changes: 1 addition & 1 deletion .platform.app.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: app
type: php:7.4
type: php:8.2

dependencies:
php:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.4-cli
FROM php:8.2-cli

ARG USER_ID
ARG GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For manual installation, you can also [download the latest binaries](https://git

_This installation method is considered legacy and is discouraged, use one of the methods above instead. Starting with version 5.x, this installation method will not be supported._

In order to use the Legacy installer, you need to have an operating system supported by PHP (Linux, OS X, or Windows) and PHP 5.5.9 or higher, with the following extensions: `curl`, `json`, `pcre`, and `phar`.
In order to use the Legacy installer, you need to have an operating system supported by PHP (Linux, OS X, or Windows) and PHP 8.2 or higher, with the following extensions: `curl`, `json`, `pcre`, and `phar`.

Run this command to install the CLI using the legacy installer, given that you have PHP already installed:

Expand Down
5 changes: 0 additions & 5 deletions bin/platform
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ ini_set('log_errors', '0');
// Disable early deprecation notices, e.g. those relating to Symfony Console.
error_reporting(E_ALL & ~E_DEPRECATED);

if (version_compare(PHP_VERSION, '5.5.9', '<')) {
printf("This tool requires at least PHP 5.5.9. You currently have %s installed. Please upgrade your PHP version.\n", PHP_VERSION);
exit(1);
}

if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
require __DIR__ . '/../vendor/autoload.php';
} elseif (file_exists(__DIR__ . '/../../../autoload.php')) {
Expand Down
16 changes: 11 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Platform.sh CLI",
"license": "MIT",
"require": {
"php": ">=5.5.9",
"php": ">=8.2",
"doctrine/cache": "~1.5",
"guzzlehttp/guzzle": "^5.3",
"guzzlehttp/ringphp": "^1.1",
Expand All @@ -25,8 +25,15 @@
"khill/php-duration": "^1.1",
"giggsey/libphonenumber-for-php": "^8.13",
"symfony/polyfill-mbstring": "^1.19",
"symfony/polyfill-iconv": "^1.19"
"symfony/polyfill-iconv": "^1.19",
"padraic/humbug_get_contents": "dev-allow-php-8 as 1.1.3"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/pjcdawkins/humbug_get_contents"
}
],
"suggest": {
"drush/drush": "For Drupal projects"
},
Expand All @@ -42,8 +49,7 @@
}
},
"require-dev": {
"phpunit/phpunit": "^4.3 !=4.8.0",
"drush/drush": "^8.0"
"phpunit/phpunit": "^11"
},
"authors": [
{
Expand All @@ -58,7 +64,7 @@
],
"config": {
"platform": {
"php": "5.5.9"
"php": "8.2"
}
},
"scripts": {
Expand Down
Loading
Loading