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

General: update our PHP version requirements to PHP 7.0 #34126

Merged
merged 27 commits into from
Nov 17, 2023

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Nov 14, 2023

Fixes #31714

Proposed changes:

Now that WordPress 6.4 is available, our plugins will be able to drop support for WordPress 6.2 and require WordPress 6.3 (to happen in a follow-up PR, #34127).

WordPress 6.3 introduced a new PHP version requirement: PHP 7.0. We can now match that requirement in all our tools.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

  • No

Testing instructions:

  • Check if CI is happy
  • Check that the changes to the codesniffer to remove one set of rules makes sense.

Copy link
Contributor

github-actions bot commented Nov 14, 2023

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the update/php-requirements branch.

    • For jetpack-mu-wpcom changes, also add define( 'JETPACK_MU_WPCOM_LOAD_VIA_BETA_PLUGIN', true ); to your wp-config.php file.
  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack update/php-requirements
    
    bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/php-requirements
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions bot added [Package] Changelogger [Package] Codesniffer [Package] My Jetpack [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Beta For serving live branches and the beta versions. https://github.com/automattic/jetpack-beta [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] CRM Issues about the Jetpack CRM plugin [Plugin] Debug Helper Debug Tools plugin [Plugin] Inspect [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Migration [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Starter Plugin [Plugin] Super Cache A fast caching plugin for WordPress. [Plugin] VaultPress [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Tests] Includes Tests [Tools] Development CLI The tools/cli to assist during JP development. Actions GitHub actions used to automate some of the work around releases and repository management Docs labels Nov 14, 2023
Copy link
Contributor

github-actions bot commented Nov 14, 2023

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • 🔴 Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team Review" label and ask someone from your team review the code. Once reviewed, it can then be merged.
If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.


Beta plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen daily.
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly. The next release is scheduled for December 5, 2023 (scheduled code freeze on November 28, 2023).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Debug Helper plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Backup plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Vaultpress plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Boost plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Search plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Social plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Starter Plugin plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Protect plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Videopress plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Super Cache plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Migration plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Mu Wpcom plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Inspect plugin:

  • Next scheduled release: December 5, 2023.
  • Scheduled code freeze: November 27, 2023.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@anomiex
Copy link
Contributor

anomiex commented Nov 16, 2023

This should be updated too

define( 'VAULTPRESS__MINIMUM_PHP_VERSION', '5.6' );

@jeherve
Copy link
Member Author

jeherve commented Nov 17, 2023

This should be updated too

define( 'VAULTPRESS__MINIMUM_PHP_VERSION', '5.6' );

I'd rather not do that here, to be honest. The VaultPress plugin still requires WordPress 5.2:

Requires at least: 5.2

I'm thinking we should update that before we up the PHP requirement.

I do not recall why we haven't updated the WordPress requirement in the past, but I assume there is a reason. We last updated it before we brought it to the monorepo, in Automattic/vaultpress#101

I couldn't find anything on p2 either. Maybe worth doing in a follow-up PR?

@anomiex
Copy link
Contributor

anomiex commented Nov 17, 2023

These should match. If you'd rather leave them both at 5.6 for now, I could go with that.

define( 'VAULTPRESS__MINIMUM_PHP_VERSION', '5.6' );

@jeherve
Copy link
Member Author

jeherve commented Nov 17, 2023

These should match. If you'd rather leave them both at 5.6 for now, I could go with that.

define( 'VAULTPRESS__MINIMUM_PHP_VERSION', '5.6' );

Ah yeah, I didn't mean to replace that one, thank you! 82cbf50

Copy link
Contributor

Choose a reason for hiding this comment

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

This change is no longer happening, delete this file. Then the plugin's version will need to be un-bumped too.

Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Let's do it!

@jeherve jeherve enabled auto-merge (squash) November 17, 2023 15:16
@jeherve jeherve merged commit b62f68f into trunk Nov 17, 2023
64 of 65 checks passed
@jeherve jeherve deleted the update/php-requirements branch November 17, 2023 15:35
@github-actions github-actions bot removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Nov 17, 2023
anomiex added a commit that referenced this pull request Nov 17, 2023
This makes for a better experience for third parties using the packages,
as they can see on Packagist which PHP versions the package is supposed
to support.

Also this is a good excuse to make a major version bump for all the
packages following #34126 which removed testing with PHP 5.6 and allows
use of 7.0+ features going forward.

And since we're making systematic use of declared PHP versions now,
let's lint for that and make use of it to skip phpunit tests where
appropriate.
anomiex added a commit that referenced this pull request Nov 20, 2023
This makes for a better experience for third parties using the packages,
as they can see on Packagist which PHP versions the package is supposed
to support.

Also this is a good excuse to make a major version bump for all the
packages following #34126 which removed testing with PHP 5.6 and allows
use of 7.0+ features going forward.

And since we're making systematic use of declared PHP versions now,
let's lint for that and make use of it to skip phpunit tests where
appropriate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions GitHub actions used to automate some of the work around releases and repository management Docs [Package] Changelogger [Package] Codesniffer [Package] My Jetpack [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Beta For serving live branches and the beta versions. https://github.com/automattic/jetpack-beta [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] CRM Issues about the Jetpack CRM plugin [Plugin] Debug Helper Debug Tools plugin [Plugin] Inspect [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Migration [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Starter Plugin [Plugin] Super Cache A fast caching plugin for WordPress. [Plugin] VaultPress [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Pri] Normal [Tests] Includes Tests [Tools] Development CLI The tools/cli to assist during JP development. [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

General: drop support for PHP 5
3 participants