Drop PHP 7.4 - #1120
Conversation
|
I would like to make the switch when its worth doing. With PHP 8, I would like to redesign quite a few APIs and use named parameters. Let's hold off on that until the next major version, since we are currently closing in on the v15 release. |
|
V15 is released since some time and works pretty well. Would it be a good moment to start developing V16? |
|
I personally still have a need for PHP 7.4 compatibility and am not eager to drop it. |
|
Sorry to ask, but are there any changes in your situation @spawnia? I'm currently working on #1426 and I feel quiet silly to not be able to use union types and have to fallback to no type safety at all. PHP 7.4 is EOL for a long time now. In my opinion it does not make any sense to keep supporting this. |
|
I still have an important project to maintain that uses this library through https://github.com/spawnia/sailor, and probably will for a couple of years. I guess GraphQL is pretty slow to change aspects that affect the client, so I might not have to worry about backwards compatibility that much. I can definitely see the advantages of using a newer PHP version for development. Perhaps we can implement something like https://getrector.com/blog/how-all-frameworks-can-bump-to-php-81-and-you-can-use-older-php to get the best of both? |
|
Just wondering, but why does Sailor have to keep supporting PHP 7.4? I don't really think it's worth the effort to downgrade this project with Rector. Gives you a lot of other issues to deal with, and for what? |
|
I just explained why, and I am starting to get annoyed by your repeated questioning of my reasons. |
|
Alright, I misread it. Not my intention to annoy you |
|
@spawnia maybe the legacy project of yours can use Rector to downgrade the sailor lib? Or create sailor-legacy repo that autodowngrades sailor upstream lib. |
# Conflicts: # .github/workflows/autoformat.yml # .github/workflows/ci.yml
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s minimum supported PHP version by removing PHP 7.4 support, aligning Composer constraints and (part of) CI accordingly.
Changes:
- Bump Composer PHP requirement to PHP 8.x only.
- Update changelog PHP requirement note.
- Remove PHP 7.4 from the static-analysis workflow matrix.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| composer.json | Raises the minimum PHP version constraint to PHP 8.x. |
| CHANGELOG.md | Updates the documented minimum PHP requirement in the changelog. |
| .github/workflows/static-analysis.yml | Removes PHP 7.4 from the PHPStan static analysis CI matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "homepage": "https://github.com/webonyx/graphql-php", | ||
| "require": { | ||
| "php": "^7.4 || ^8", | ||
| "php": "^8", |
| ## v15.0.0 | ||
|
|
||
| ### Changed | ||
|
|
||
| - PHP version required: 7.4+ | ||
| - PHP version required: 8.0+ |
| matrix: | ||
| php-version: | ||
| - "7.4" | ||
| - "8.0" | ||
| - "8.1" | ||
| - "8.2" |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
composer.json:13
- composer.json now requires PHP ^8, but the CI workflows still run jobs on PHP 7.4 (e.g., .github/workflows/test.yml matrix includes 7.4 and benchmarks job pins php-version: "7.4"). Those jobs will fail at Composer install due to this new platform requirement, so dropping 7.4 should be accompanied by removing/updating all remaining 7.4 references in CI (and any other tooling like the Makefile php-cs-fixer image).
"require": {
"php": "^8",
"ext-json": "*",
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
.github/workflows/static-analysis.yml:20
- Composer now requires PHP ^8, but CI still runs PHP 7.4 in
.github/workflows/test.yml(matrix and benchmarks). With this change, those jobs will fail dependency installation due to the platform requirement. Please remove/update the remaining 7.4 entries (and any other tooling references) to keep CI consistent with the supported PHP versions.
strategy:
fail-fast: false
matrix:
php-version:
- "8.0"
- "8.1"
- "8.2"
CHANGELOG.md:629
- This updates the “PHP version required” note under
v15.0.0. Sincev15.0.0is a historical release, changing its requirements retroactively can be misleading. If the intent is to drop PHP 7.4 onmaster, consider recording this underUnreleased(or the next release section) and keep thev15.0.0entry as originally published.
## v15.0.0
### Changed
- PHP version required: 8.0+
| matrix: | ||
| php-version: | ||
| - "7.4" | ||
| - "8.0" |
There was a problem hiding this comment.
@spawnia I don't know what version do you need to support but I'd support only currently supported ones - 8.2+
https://www.php.net/supported-versions.php
I was wondering that for master we could drop PHP 7.4 already.