Skip to content

Drop PHP 7.4 - #1120

Draft
simPod wants to merge 5 commits into
webonyx:masterfrom
simPod:php
Draft

Drop PHP 7.4#1120
simPod wants to merge 5 commits into
webonyx:masterfrom
simPod:php

Conversation

@simPod

@simPod simPod commented Apr 25, 2022

Copy link
Copy Markdown
Collaborator

I was wondering that for master we could drop PHP 7.4 already.

@simPod
simPod requested a review from spawnia April 25, 2022 08:55
@spawnia

spawnia commented Apr 25, 2022

Copy link
Copy Markdown
Collaborator

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.

@spawnia spawnia added enhancement breaking change Warrants a major version bump, deferred to the next major release labels Apr 25, 2022
@simPod simPod added this to the 16.0.0 milestone Apr 25, 2022
@spawnia
spawnia marked this pull request as draft May 31, 2022 15:22
@ruudk

ruudk commented May 26, 2023

Copy link
Copy Markdown
Collaborator

V15 is released since some time and works pretty well. Would it be a good moment to start developing V16?

@spawnia

spawnia commented May 28, 2023

Copy link
Copy Markdown
Collaborator

I personally still have a need for PHP 7.4 compatibility and am not eager to drop it.

@ruudk

ruudk commented Aug 15, 2023

Copy link
Copy Markdown
Collaborator

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.

@spawnia

spawnia commented Aug 16, 2023

Copy link
Copy Markdown
Collaborator

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?

@ruudk

ruudk commented Aug 16, 2023

Copy link
Copy Markdown
Collaborator

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?

@spawnia

spawnia commented Aug 16, 2023

Copy link
Copy Markdown
Collaborator

I just explained why, and I am starting to get annoyed by your repeated questioning of my reasons.

@ruudk

ruudk commented Aug 16, 2023

Copy link
Copy Markdown
Collaborator

Alright, I misread it. Not my intention to annoy you ☺️

@simPod

simPod commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator Author

@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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread composer.json
"homepage": "https://github.com/webonyx/graphql-php",
"require": {
"php": "^7.4 || ^8",
"php": "^8",
Comment thread CHANGELOG.md
Comment on lines 607 to +611
## v15.0.0

### Changed

- PHP version required: 7.4+
- PHP version required: 8.0+
Comment on lines 16 to 20
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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": "*",

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. Since v15.0.0 is a historical release, changing its requirements retroactively can be misleading. If the intent is to drop PHP 7.4 on master, consider recording this under Unreleased (or the next release section) and keep the v15.0.0 entry as originally published.
## v15.0.0

### Changed

- PHP version required: 8.0+

matrix:
php-version:
- "7.4"
- "8.0"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

@spawnia spawnia removed this from the 16.0.0 milestone Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Warrants a major version bump, deferred to the next major release enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants