Skip to content

Drop compatibility with PHP 5.6, 7.0 and 7.1#294

Merged
enricobattocchi merged 3 commits intotrunkfrom
drop-php-5.6-7.0-7.1
Mar 23, 2023
Merged

Drop compatibility with PHP 5.6, 7.0 and 7.1#294
enricobattocchi merged 3 commits intotrunkfrom
drop-php-5.6-7.0-7.1

Conversation

@enricobattocchi
Copy link
Copy Markdown
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 Yoast SEO is not required to run Yoast Duplicate Post, the latter is not an addon.
  • Also note that composer.lock is 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:

  • 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

jrfnl added 2 commits March 21, 2023 11:48
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).
Copy link
Copy Markdown
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.
  • Removed the config-platform setting from composer.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.

@enricobattocchi enricobattocchi added this to the 4.6 milestone Mar 23, 2023
@enricobattocchi enricobattocchi merged commit b0761e4 into trunk Mar 23, 2023
@enricobattocchi enricobattocchi deleted the drop-php-5.6-7.0-7.1 branch March 23, 2023 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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