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: require PHP 5.3+ to be able to run Jetpack. #12395

Merged
merged 3 commits into from
May 17, 2019

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented May 16, 2019

Given that Jetpack supports WordPress’ latest version (currently 5.2) as well as one version prior, we can't benefit from the changes introduced in WordPress 5.2 yet: Jetpack currently supports WordPress 5.1, and the required PHP version set by WP 5.1 is PHP 5.2.
This PR aims to change that required PHP version for Jetpack, until WordPress 5.3 is released; at that point Jetpack can go back to following WordPress’ PHP requirements and thus require PHP 5.6.

Changes proposed in this Pull Request:

If a site runs WP 5.1 (where the PHP requirements are still PHP 5.2) and updates Jetpack:

  1. We pause Jetpack (stop loading it).
  2. We display an admin notice inviting folks to update PHP.
  3. If WP_DEBUG is on, we log an error.

Is this a new feature or does it add/remove features to an existing part of Jetpack?

  • More discussion here: p9dueE-Lz-p2

Testing instructions:

  • Add the following to your wp-config.php file:
    define( 'JETPACK__MINIMUM_PHP_VERSION', '7.4' );
  • Load your dashboard.
  • You should see this warning and Jetpack will not be loaded:

screenshot 2019-05-16 at 17 32 51

Proposed changelog entry for your changes:

  • General: Jetpack now requires PHP 5.3, and will display a notice if your site uses an older version of PHP.

If a site runs WP 5.1 (where the PHP requirements are still PHP 5.2) and updates Jetpack:
1. We pause Jetpack (stop loading it).
2. We display an admin notice inviting folks to update PHP.
3. If WP_DEBUG is on, we log an error.
@jeherve jeherve added General [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Type] Janitorial labels May 16, 2019
@jeherve jeherve added this to the 7.4 milestone May 16, 2019
@jeherve jeherve requested a review from a team as a code owner May 16, 2019 15:58
@jeherve jeherve self-assigned this May 16, 2019
@jetpackbot
Copy link

jetpackbot commented May 16, 2019

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: June 4, 2019.
Scheduled code freeze: May 28, 2019

Generated by 🚫 dangerJS against 29e5f51

@@ -29,12 +29,6 @@ env:
# so it doesn't need to be re-defined below.
matrix:
include:
# The versions listed below run within Precise distro with PHP 5.2 due to Travis limitation
Copy link
Member

Choose a reason for hiding this comment

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

Love these red lines :)

@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels May 16, 2019
@gravityrail
Copy link
Contributor

❤️

@jeherve jeherve merged commit 2e9efb2 into master May 17, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels May 17, 2019
@jeherve jeherve deleted the update/php-minimum-version branch May 17, 2019 21:31
kraftbj added a commit that referenced this pull request May 21, 2019
kraftbj added a commit that referenced this pull request May 21, 2019
* Bump minimum WP version missed in #12287

* Update minimum version missed in #12395
*
* @since 7.4.0
*/
function jetpack_admin_unsupported_php_notice() { ?>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could moved this inside the if ( version_compare( phpversion(), JETPACK__MINIMUM_PHP_VERSION, '<' ) ) {?

jeherve added a commit that referenced this pull request May 27, 2019
* Kick off the changelog

* Add 7.3.1

* Update date and post link

* changelog: add #12219

* changelog: add #12170

* changelog: add #12184

* Changelog: add #12268

* Changelog: add #12081

* Changelog: add #12323

* Changelog: add #12204

* Changelog: add #12269

* Changelog: add #12332

* changelog: add #12339

* changelog: add #12209

* Changelog: add #12319

* Changelog: add #12357

* Changelog: add #12124

* Changelog: add #12373

* Changelog: add #12252

* Changelog: add #12383

* Changelog: add #12372

* changelog: add #12337

* Changelog: add #12290

* Changelog: add #12301

* Changelog: add #12061

* Testing list: add instructions for #12061

* Changelog: add #12393

* Update minimum supported version

See #12287

* Changelog: add #12406

* Testing list: add #12406

* Changelog: add #12277

* Changelog: add #12412

* Changelog: add #11318

* Changelog: add #12328

* Changelog: add #12425

* Changelog: add #12380

* Changelog: add #12428

* Changelog: add #12414

* Changelog: add #12395

* Changelog & Testing list: add #12416, #12417, #12418, and #12348

* changelog: add #12379

* Changelog: add #12341

* changelog: add #12444

* Changelog: add #12434

* Changelog: add #12454

* Changelog: add #12460

* Changelog: add #12463

* Changelog: add #12457

* Changelog / testing list: add #10333

* Changelog: add #12467


Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>
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.

7 participants