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

Drop compatibility with PHP 5.6, 7.0 and 7.1 #333

Merged
merged 5 commits into from
Mar 23, 2023

Conversation

enricobattocchi
Copy link
Member

@enricobattocchi enricobattocchi commented Mar 20, 2023

Context

Summary

This PR can be summarized in the following changelog entry:

  • Drops compatibility with PHP 5.6, 7.0 and 7.1.

Relevant technical choices:

  • Note that this addon doesn't have any requirement to Yoast SEO so we won't need to update any reference to the Free feature branch.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Verify the GH actions pass
  • install on a PHP 5.6 environment
  • visit the Plugins page
  • see that you get the same message and you can't activate the plugin, as it happens here for Free and Premium:
    Screenshot 2023-03-03 at 13-28-32 Plugins ‹ rodeo-polo-nimi instawp xyz — WordPress
  • the same should happen with 7.0 and 7.1

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:
Screenshot 2023-03-03 at 11-27-45 Upload Plugin ‹ rodeo-polo-nimi instawp xyz — WordPress
which is also a nice thing to check, actually.

So a way could be:

  • start a 7.2 site on instawp
  • upload the artifact but don't activate it
  • switch to 5.6
  • check that you get the same message above and you can't activate the plugin
  • switch to 7.0 an 7.1
  • the same should happen

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Block/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

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

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Documentation

  • I have written documentation for this change.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label and noted the work hours.

Fixes Yoast/wordpress-seo#19801

@enricobattocchi enricobattocchi added the changelog: other Needs to be included in the 'Other' category in the changelog label Mar 20, 2023
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
This commit updates the locked test dependencies to versions compatible with PHP 7.2 (the new minimum supported PHP version).

Effectively, this updates the locked PHPUnit version from version `5.7.27` to version `8.5.33`.
Patchwork, an underlying dependency for BrainMonkey, which is a dependency of WP Test Utils, has released new versions.

This updates the Patchwork dependency to the latest release.

Ref: https://github.com/antecedent/patchwork/releases
* Simplify the Composer install logic and make the logic be in sync with the logic used for the same elsewhere.
@private-packagist
Copy link

composer.lock

Dev Package changes

Package Operation From To Changes
phar-io/manifest add - 2.0.3 view code
phar-io/version add - 3.2.1 view code
sebastian/object-reflector add - 1.1.2 view code
sebastian/type add - 1.1.4 view code
theseer/tokenizer add - 1.2.1 view code
antecedent/patchwork upgrade 2.1.21 2.1.25 diff
doctrine/instantiator upgrade 1.0.5 1.5.0 diff
myclabs/deep-copy upgrade 1.7.0 1.11.1 diff
phpunit/php-code-coverage upgrade 4.0.8 7.0.15 diff
phpunit/php-file-iterator upgrade 1.4.5 2.0.5 diff
phpunit/php-timer upgrade 1.0.9 2.1.3 diff
phpunit/php-token-stream upgrade 1.4.12 3.1.3 diff
phpunit/phpunit upgrade 5.7.27 8.5.33 diff
sebastian/comparator upgrade 1.2.4 3.0.5 diff
sebastian/diff upgrade 1.4.3 3.0.3 diff
sebastian/environment upgrade 2.0.0 4.2.4 diff
sebastian/exporter upgrade 2.0.0 3.1.5 diff
sebastian/global-state upgrade 1.1.1 3.0.2 diff
sebastian/object-enumerator upgrade 2.0.1 3.0.4 diff
sebastian/recursion-context upgrade 2.0.0 3.0.1 diff
sebastian/resource-operations upgrade 1.0.0 2.0.2 diff
squizlabs/php_codesniffer upgrade 3.7.1 3.7.2 diff
yoast/yoastcs upgrade 2.3.0 2.3.1 diff
phpdocumentor/reflection-common remove 1.0.1 - -
phpdocumentor/reflection-docblock remove 3.3.2 - -
phpdocumentor/type-resolver remove 0.4.0 - -
phpspec/prophecy remove v1.10.3 - -
phpunit/phpunit-mock-objects remove 3.4.4 - -
symfony/polyfill-ctype remove v1.19.0 - -
symfony/yaml remove v3.4.47 - -
webmozart/assert remove 1.9.1 - -

Settings · Docs · Powered by Private Packagist

Copy link
Contributor

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

Reviewed.

  • I've double-checked that all references to PHP 5.6 have been updated/removed ✅
  • Made the necessary selective updates to the composer.json and composer.lock file.
  • Made a few small tweaks to the GH Actions scripts.

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.

@enricobattocchi enricobattocchi added this to the 3.x / Next Release milestone Mar 23, 2023
@enricobattocchi enricobattocchi merged commit 4a2c0ff into develop Mar 23, 2023
@enricobattocchi enricobattocchi deleted the drop-php-5.6-7.0-7.1 branch March 23, 2023 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: other Needs to be included in the 'Other' category in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop compatibility with PHP 5.6, 7.0, 7.1
2 participants