Drop compatibility with PHP 5.6, 7.0 and 7.1#294
Merged
enricobattocchi merged 3 commits intotrunkfrom Mar 23, 2023
Merged
Conversation
4 tasks
The YoastCS `2.3.1` release sets the minimum supported PHP version for the PHPCompatibility checker to `7.2`, which will allow for making code changes which are possible now support for PHP < 7.2 is being dropped. Ref: https://github.com/Yoast/yoastcs/releases/tag/2.3.1
As this repo does not include a committed `composer.lock` file and does not ship with external dependencies, the `config - platform` requirement in the `composer.json` file is not needed (and would make life more difficult for devs wanting to test the plugin against higher PHP versions).
jrfnl
approved these changes
Mar 21, 2023
Contributor
jrfnl
left a comment
There was a problem hiding this comment.
Reviewed.
- I've double-checked that all references to PHP 5.6 have been updated/removed ✅
- Made the necessary selective updates to the
composer.jsonandcomposer.lockfile. - Removed the
config-platformsetting fromcomposer.json(see the commit message).
I've also verified that the tests currently pass on the absolute minimum PHP version by running the unit tests locally against PHP 7.2.5.
The caveat is, of course, that test coverage is low, so this is no guarantee, only a tentative indication.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
composer.lockis not committed to the repo by design.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
note: the above may be tricky to test. I can see 5.6 as a choice in Local by Flywheel, but I know it's not the case for others (and I can see 7.0 an 7.1 are not available - neither 7.2 actually)

I tried on Instawp, where you have the full choice of PHP versions, but when uploading the artifact I got:
which is also a nice thing to check, actually.
So a way could be:
Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Documentation
Quality assurance
Innovation
innovationlabel and noted the work hours.Fixes Yoast/wordpress-seo#19801