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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

pjcdawkins
Copy link
Collaborator

@pjcdawkins pjcdawkins commented Nov 24, 2024

This would need a major version increase.

Backwards compatibility is very important to this project. But this is now a good time for a PHP version requirement increase.

Rationale:

  • The newer installation method via the static binary (Go wrapper) has been available for more than a year. This uses its own embedded PHP, currently 8.2 (though it could easily be updated to later versions).
  • The legacy installer will continue to work on lower PHP versions, because it filters out incompatible CLI versions.
  • PHP 8.1 reached EOL a year ago.
  • PHP 7.4 reached EOL three years ago.
  • Major PHP frameworks require PHP 8.2, including Symfony, Laravel, and Adobe Commerce. Drupal 10 requires 8.1 and Drupal 11 requires 8.3.
  • Metrics on CLI use vary, but in general they show widespread PHP 8.2 and 8.3 adoption (and some PHP 8.4).
  • Some CLI dependencies report critical security issues. The issues do not affect this project directly, but others could occur in future. They could only be resolved by upgrading to versions that themselves have PHP >8 requirements, for example Guzzle >5.
  • Maintenance and testing by now would be significantly easier without needing to support older PHP versions. For example, public CI images are typically only available with newer versions.

For simplicity, this PR does not:

  • Change any CLI source code
  • Upgrade any dependencies, except PHPUnit

Other potential tasks (linked to this pull request, but which can be done separately):

  • For white label compatibility, implement the plan for installing and updating CLI configuration automatically (in the main CLI project).
  • Use static analysis for compatibility testing in CI.
  • Upgrade to the 2.x + version of the PHP client library, porting over many more recent changes from the 1.x branch.
  • Increase integration tests, potentially using a Go subpackage, importing the testing utilities currently used in https://github.com/platformsh/cli/tree/main/tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant