Updated the minimum PHP version to 7.0
This commit is contained in:
parent
3bf473517d
commit
09df1205de
|
@ -17,7 +17,6 @@ cache:
|
|||
|
||||
# Test main supported versions of PHP against latest WP.
|
||||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
|
@ -27,7 +26,7 @@ php:
|
|||
env:
|
||||
- WP_VERSION=latest WP_MULTISITE=0
|
||||
|
||||
# Additional tests against stable PHP (min version is 5.6)
|
||||
# Additional tests against stable PHP (min version is 7.0)
|
||||
# and code coverage report.
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
@ -51,7 +50,7 @@ matrix:
|
|||
php: 7.4
|
||||
env: WP_VERSION=nightly WP_MULTISITE=0
|
||||
- name: "Minimum requirements"
|
||||
php: 5.6
|
||||
php: 7.0
|
||||
env: WP_VERSION=5.0 WP_MULTISITE=0
|
||||
allow_failures:
|
||||
- php: 7.4
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"prefer-stable": true,
|
||||
"minimum-stability": "dev",
|
||||
"require": {
|
||||
"php": ">=5.6|>=7.0",
|
||||
"php": ">=7.0",
|
||||
"automattic/jetpack-autoloader": "^1.2.0",
|
||||
"automattic/jetpack-constants": "^1.1",
|
||||
"composer/installers": "1.7.0",
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<!-- Configs -->
|
||||
<config name="minimum_supported_wp_version" value="5.0" />
|
||||
<config name="testVersion" value="5.6-" />
|
||||
<config name="testVersion" value="7.0-" />
|
||||
|
||||
<!-- Rules -->
|
||||
<rule ref="WooCommerce-Core" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
This directory is home to new WooCommerce class files under the \Automattic\WooCommerce\ namespace using PSR-4 file naming. This is to take full advantage of autoloading.
|
||||
|
||||
Currently, these classes have a PHP 5.6 requirement. No required core classes will be added here until this PHP version is enforced. If running an older version of PHP, these class files will not be used.
|
||||
Currently, these classes have a PHP 7.0 requirement. No required core classes will be added here until this PHP version is enforced. If running an older version of PHP, these class files will not be used.
|
||||
|
||||
## Installing Composer
|
||||
|
||||
|
|
|
@ -10,17 +10,6 @@
|
|||
*/
|
||||
class WC_Tests_Packages extends WC_Unit_Test_Case {
|
||||
|
||||
/**
|
||||
* Setup test class.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
|
||||
$this->markTestSkipped( 'Packages are disabled unless running PHP 5.6+' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test packages exist - this requires composer install to have ran.
|
||||
*/
|
||||
|
|
|
@ -18,24 +18,14 @@ if ( ! defined( 'WC_PLUGIN_FILE' ) ) {
|
|||
define( 'WC_PLUGIN_FILE', __FILE__ );
|
||||
}
|
||||
|
||||
/**
|
||||
* Load core packages and the autoloader.
|
||||
*
|
||||
* The new packages and autoloader require PHP 5.6+. If this dependency is not met, do not include them. Users will be warned
|
||||
* that they are using an older version of PHP. WooCommerce will continue to load, but some functionality such as the REST API
|
||||
* and Blocks will be missing.
|
||||
*
|
||||
* This requirement will be enforced in future versions of WooCommerce.
|
||||
*/
|
||||
if ( version_compare( PHP_VERSION, '5.6.0', '>=' ) ) {
|
||||
require __DIR__ . '/src/Autoloader.php';
|
||||
require __DIR__ . '/src/Packages.php';
|
||||
// Load core packages and the autoloader.
|
||||
require __DIR__ . '/src/Autoloader.php';
|
||||
require __DIR__ . '/src/Packages.php';
|
||||
|
||||
if ( ! \Automattic\WooCommerce\Autoloader::init() ) {
|
||||
return;
|
||||
}
|
||||
\Automattic\WooCommerce\Packages::init();
|
||||
if ( ! \Automattic\WooCommerce\Autoloader::init() ) {
|
||||
return;
|
||||
}
|
||||
\Automattic\WooCommerce\Packages::init();
|
||||
|
||||
// Include the main WooCommerce class.
|
||||
if ( ! class_exists( 'WooCommerce', false ) ) {
|
||||
|
|
Loading…
Reference in New Issue