Woocommerce-admin: Bump PHP and WordPress requirements for plugin

Created on 10 May 2019  路  6Comments  路  Source: woocommerce/woocommerce-admin

https://github.com/woocommerce/woocommerce-admin/pull/2083 introduced traits and bumped the PHP requirements to PHP 5.4+.

There was some discussion in the above PR about bumping to WP 5.2 which would move PHP requirements to 5.6.20. So we have 3 options:

  • Leave PHP requirements as 5.4+ to support WP 5.0 and 5.1.
  • Bump WP version 5.2. and PHP to 5.6.20.
  • Remove the traits added in #2083, maintain methods separately (some code duplication) and drop PHP version requirements back down.
documentation question

Most helpful comment

We talked about it in the team meeting today.
Preliminary conclusion:

  • We will announce bumping PHP requirement to 5.6 with a post on dev blog soon
  • This requirement will officially become effective at the time of WC 3.7 release, but we prefer to only load the code in case correct PHP version is available (so it would not break existing installations).

Therefore, according to my understanding, in this PR we need to add code to conditionally load the classes only if WP > 5 && PHP > 5.4.

All 6 comments

As we're going to merge this code into WC core for 3.7, I don't think we can require WP 5.2 (which is 5 days old at the moment). Also, WP 5.0's minimum requirements is PHP 5.2.4 (unless I'm mistaken). Which leaves us, unfortunately, with supporting PHP 5.2.4 at the moment, I think. Please let me know your thoughts.

An alternative for core would be to have WCA conditional on PHP 5.6 or higher. About 19% of WP installs are < 5.6 per https://wordpress.org/about/stats/. I'm not sure if there are better stats for WooCommerce.

Our tracker data is quite a bit more optimistic, it shows only 4% of users with PHP v < 5.6 (and only 0.5% < PHP 5.4), so we could make it load only for PHP 5.6 without losing many users.
And based on discussions with @timmyc it seems like WC admin will most likely depend on WP 5 as well, which is a stronger requirement, so requiring PHP 5.6 should not be a big deal.

it seems like WC admin will most likely depend on WP 5 as well, which is a stronger requirement, so requiring PHP 5.6 should not be a big deal.

Correct if 5.0 is not present, no wc-admin features will be functional in woo core - just like it is currently in the feature plugin.

We talked about it in the team meeting today.
Preliminary conclusion:

  • We will announce bumping PHP requirement to 5.6 with a post on dev blog soon
  • This requirement will officially become effective at the time of WC 3.7 release, but we prefer to only load the code in case correct PHP version is available (so it would not break existing installations).

Therefore, according to my understanding, in this PR we need to add code to conditionally load the classes only if WP > 5 && PHP > 5.4.

As we're going to merge this code into WC core for 3.7

Since this is no longer the case, we should revisit this discussion. I'd be in favour of requiring WP 5.2.

Was this page helpful?
0 / 5 - 0 ratings