Bump WooCommerce minimum required PHP version to 7.4 (#39820)

-Change "Requires PHP":
  - In woocommerce.php
  - In readme.txt
  - In plugins/woocommerce-docs/woocommerce-docs.php
  - In packages/js/create-product-editor-block/plugin-templates/$slug.php.mustache

- Change "testVersion" in phpcs.xml:
  - In the root of the repository
  - In plugins/woocommerce
  - In plugins/woocommerce-beta-tester

- Change "require-php" and "config-platform-php" in composer.json
- Update composer.lock with more modern versions of some of the dependencies
- Remove the admin notice about the upcoming bump for PHP 7.3 users in class-wc-admin-notices.php
This commit is contained in:
Néstor Soriano 2023-08-22 09:21:09 +02:00 committed by GitHub
parent c2cbc87807
commit 4876ab35b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 117 additions and 147 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Bump required PHP version to 7.4

View File

@ -10,7 +10,7 @@
* Version: {{version}}
* Requires at least: 6.2
* WC requires at least: 7.8
* Requires PHP: 7.3
* Requires PHP: 7.4
{{#author}}
* Author: {{author}}
{{/author}}

View File

@ -27,7 +27,7 @@
<!-- Configs -->
<config name="minimum_supported_wp_version" value="5.2" />
<config name="testVersion" value="7.3-" />
<config name="testVersion" value="7.4-" />
<!-- Rules -->
<rule ref="WooCommerce-Core" />

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Bump required PHP version to 7.4

View File

@ -17,7 +17,7 @@
<!-- Configs -->
<config name="minimum_supported_wp_version" value="5.2" />
<config name="testVersion" value="7.3-" />
<config name="testVersion" value="7.4-" />
<!-- Rules -->
<rule ref="WooCommerce-Core" />

View File

@ -9,7 +9,7 @@
* Text Domain: woocommerce-docs
* Domain Path: /i18n/languages/
* Requires at least: 6.1
* Requires PHP: 7.3
* Requires PHP: 7.4
*
* @package WooCommerce
*/

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Bump required PHP version to 7.4

View File

@ -14,7 +14,7 @@
}
],
"require": {
"php": ">=7.3",
"php": ">=7.4",
"automattic/jetpack-autoloader": "2.11.18",
"automattic/jetpack-config": "1.15.2",
"automattic/jetpack-connection": "1.51.7",
@ -42,7 +42,7 @@
},
"sort-packages": true,
"platform": {
"php": "7.3"
"php": "7.4"
},
"allow-plugins": {
"automattic/jetpack-autoloader": true,

View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6ffef9aa7dba31a1330dd042b0810df0",
"content-hash": "21dd370a009f4b74c2cabc6ff71f400a",
"packages": [
{
"name": "automattic/jetpack-a8c-mc-stats",
@ -416,24 +416,24 @@
},
{
"name": "automattic/jetpack-status",
"version": "v1.17.1",
"version": "v1.18.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-status.git",
"reference": "0032ee4bce1d4644722ba46858c702a0afa76cff"
"reference": "98feb85e54ec04ccd2dd37acc4df18ec521249d3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Automattic/jetpack-status/zipball/0032ee4bce1d4644722ba46858c702a0afa76cff",
"reference": "0032ee4bce1d4644722ba46858c702a0afa76cff",
"url": "https://api.github.com/repos/Automattic/jetpack-status/zipball/98feb85e54ec04ccd2dd37acc4df18ec521249d3",
"reference": "98feb85e54ec04ccd2dd37acc4df18ec521249d3",
"shasum": ""
},
"require": {
"automattic/jetpack-constants": "^1.6.22"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.2",
"automattic/jetpack-ip": "^0.1.3",
"automattic/jetpack-changelogger": "^3.3.7",
"automattic/jetpack-ip": "^0.1.4",
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.0.4"
},
@ -448,7 +448,7 @@
"link-template": "https://github.com/Automattic/jetpack-status/compare/v${old}...v${new}"
},
"branch-alias": {
"dev-trunk": "1.17.x-dev"
"dev-trunk": "1.18.x-dev"
}
},
"autoload": {
@ -462,9 +462,9 @@
],
"description": "Used to retrieve information about the current status of Jetpack and the site overall.",
"support": {
"source": "https://github.com/Automattic/jetpack-status/tree/v1.17.1"
"source": "https://github.com/Automattic/jetpack-status/tree/v1.18.0"
},
"time": "2023-05-11T05:50:45+00:00"
"time": "2023-07-18T23:45:14+00:00"
},
{
"name": "composer/installers",
@ -815,16 +815,16 @@
},
{
"name": "symfony/css-selector",
"version": "v5.4.21",
"version": "v5.4.26",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d"
"reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/95f3c7468db1da8cc360b24fa2a26e7cefcb355d",
"reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a",
"reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a",
"shasum": ""
},
"require": {
@ -861,7 +861,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/css-selector/tree/v5.4.21"
"source": "https://github.com/symfony/css-selector/tree/v5.4.26"
},
"funding": [
{
@ -877,7 +877,7 @@
"type": "tidelift"
}
],
"time": "2023-02-14T08:03:56+00:00"
"time": "2023-07-07T06:10:25+00:00"
},
{
"name": "symfony/polyfill-php80",
@ -1070,16 +1070,16 @@
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
"version": "v3.3.2",
"version": "v3.3.7",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
"reference": "7cf54b678e9a0e284a772abf01317ccc1b811715"
"reference": "ac8e32bdd0a79a36ca7b73f5242408909224ba1f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/7cf54b678e9a0e284a772abf01317ccc1b811715",
"reference": "7cf54b678e9a0e284a772abf01317ccc1b811715",
"url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/ac8e32bdd0a79a36ca7b73f5242408909224ba1f",
"reference": "ac8e32bdd0a79a36ca7b73f5242408909224ba1f",
"shasum": ""
},
"require": {
@ -1120,10 +1120,16 @@
"GPL-2.0-or-later"
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"keywords": [
"changelog",
"cli",
"dev",
"keepachangelog"
],
"support": {
"source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.2"
"source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.7"
},
"time": "2023-02-20T19:46:43+00:00"
"time": "2023-07-17T15:48:51+00:00"
},
{
"name": "bamarni/composer-bin-plugin",
@ -1358,16 +1364,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.15.4",
"version": "v4.17.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290"
"reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
"reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
"shasum": ""
},
"require": {
@ -1408,9 +1414,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1"
},
"time": "2023-03-05T19:49:14+00:00"
"time": "2023-08-13T19:53:39+00:00"
},
{
"name": "phar-io/manifest",
@ -1525,16 +1531,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.26",
"version": "9.2.27",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1"
"reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
"reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1",
"reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1",
"shasum": ""
},
"require": {
@ -1590,7 +1596,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26"
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27"
},
"funding": [
{
@ -1598,7 +1605,7 @@
"type": "github"
}
],
"time": "2023-03-06T12:58:08+00:00"
"time": "2023-07-26T13:44:30+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -1843,16 +1850,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.6.5",
"version": "9.6.11",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "86e761949019ae83f49240b2f2123fb5ab3b2fc5"
"reference": "810500e92855eba8a7a5319ae913be2da6f957b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/86e761949019ae83f49240b2f2123fb5ab3b2fc5",
"reference": "86e761949019ae83f49240b2f2123fb5ab3b2fc5",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/810500e92855eba8a7a5319ae913be2da6f957b0",
"reference": "810500e92855eba8a7a5319ae913be2da6f957b0",
"shasum": ""
},
"require": {
@ -1925,7 +1932,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.5"
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.11"
},
"funding": [
{
@ -1941,24 +1949,24 @@
"type": "tidelift"
}
],
"time": "2023-03-09T06:34:10+00:00"
"time": "2023-08-19T07:10:56+00:00"
},
{
"name": "psr/container",
"version": "1.1.1",
"version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": ""
},
"require": {
"php": ">=7.2.0"
"php": ">=7.4.0"
},
"type": "library",
"autoload": {
@ -1987,9 +1995,9 @@
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.1"
"source": "https://github.com/php-fig/container/tree/1.1.2"
},
"time": "2021-03-05T17:36:06+00:00"
"time": "2021-11-05T16:50:12+00:00"
},
{
"name": "sebastian/cli-parser",
@ -2291,16 +2299,16 @@
},
{
"name": "sebastian/diff",
"version": "4.0.4",
"version": "4.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
"reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
"reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
"shasum": ""
},
"require": {
@ -2345,7 +2353,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
"source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
"source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
},
"funding": [
{
@ -2353,7 +2361,7 @@
"type": "github"
}
],
"time": "2020-10-26T13:10:38+00:00"
"time": "2023-05-07T05:35:17+00:00"
},
{
"name": "sebastian/environment",
@ -2497,16 +2505,16 @@
},
{
"name": "sebastian/global-state",
"version": "5.0.5",
"version": "5.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
"reference": "bde739e7565280bda77be70044ac1047bc007e34"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34",
"reference": "bde739e7565280bda77be70044ac1047bc007e34",
"shasum": ""
},
"require": {
@ -2549,7 +2557,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6"
},
"funding": [
{
@ -2557,7 +2565,7 @@
"type": "github"
}
],
"time": "2022-02-14T08:28:10+00:00"
"time": "2023-08-02T09:26:13+00:00"
},
{
"name": "sebastian/lines-of-code",
@ -2957,16 +2965,16 @@
},
{
"name": "symfony/console",
"version": "v5.4.21",
"version": "v5.4.26",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "c77433ddc6cdc689caf48065d9ea22ca0853fbd9"
"reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/c77433ddc6cdc689caf48065d9ea22ca0853fbd9",
"reference": "c77433ddc6cdc689caf48065d9ea22ca0853fbd9",
"url": "https://api.github.com/repos/symfony/console/zipball/b504a3d266ad2bb632f196c0936ef2af5ff6e273",
"reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273",
"shasum": ""
},
"require": {
@ -3031,12 +3039,12 @@
"homepage": "https://symfony.com",
"keywords": [
"cli",
"command line",
"command-line",
"console",
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.4.21"
"source": "https://github.com/symfony/console/tree/v5.4.26"
},
"funding": [
{
@ -3052,7 +3060,7 @@
"type": "tidelift"
}
],
"time": "2023-02-25T16:59:41+00:00"
"time": "2023-07-19T20:11:33+00:00"
},
{
"name": "symfony/deprecation-contracts",
@ -3532,16 +3540,16 @@
},
{
"name": "symfony/process",
"version": "v5.4.21",
"version": "v5.4.26",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd"
"reference": "1a44dc377ec86a50fab40d066cd061e28a6b482f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd",
"reference": "d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd",
"url": "https://api.github.com/repos/symfony/process/zipball/1a44dc377ec86a50fab40d066cd061e28a6b482f",
"reference": "1a44dc377ec86a50fab40d066cd061e28a6b482f",
"shasum": ""
},
"require": {
@ -3574,7 +3582,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v5.4.21"
"source": "https://github.com/symfony/process/tree/v5.4.26"
},
"funding": [
{
@ -3590,7 +3598,7 @@
"type": "tidelift"
}
],
"time": "2023-02-21T19:46:44+00:00"
"time": "2023-07-12T15:44:31+00:00"
},
{
"name": "symfony/service-contracts",
@ -3677,16 +3685,16 @@
},
{
"name": "symfony/string",
"version": "v5.4.21",
"version": "v5.4.26",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "edac10d167b78b1d90f46a80320d632de0bd9f2f"
"reference": "1181fe9270e373537475e826873b5867b863883c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/edac10d167b78b1d90f46a80320d632de0bd9f2f",
"reference": "edac10d167b78b1d90f46a80320d632de0bd9f2f",
"url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c",
"reference": "1181fe9270e373537475e826873b5867b863883c",
"shasum": ""
},
"require": {
@ -3743,7 +3751,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.4.21"
"source": "https://github.com/symfony/string/tree/v5.4.26"
},
"funding": [
{
@ -3759,7 +3767,7 @@
"type": "tidelift"
}
],
"time": "2023-02-22T08:00:55+00:00"
"time": "2023-06-28T12:46:07+00:00"
},
{
"name": "theseer/tokenizer",
@ -3868,16 +3876,16 @@
},
{
"name": "yoast/phpunit-polyfills",
"version": "1.0.4",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/Yoast/PHPUnit-Polyfills.git",
"reference": "3c621ff5429d2b1ff96dc5808ad6cde99d31ea4c"
"reference": "224e4a1329c03d8bad520e3fc4ec980034a4b212"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/3c621ff5429d2b1ff96dc5808ad6cde99d31ea4c",
"reference": "3c621ff5429d2b1ff96dc5808ad6cde99d31ea4c",
"url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/224e4a1329c03d8bad520e3fc4ec980034a4b212",
"reference": "224e4a1329c03d8bad520e3fc4ec980034a4b212",
"shasum": ""
},
"require": {
@ -3885,13 +3893,12 @@
"phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
},
"require-dev": {
"yoast/yoastcs": "^2.2.1"
"yoast/yoastcs": "^2.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.x-dev",
"dev-develop": "1.x-dev"
"dev-main": "2.x-dev"
}
},
"autoload": {
@ -3925,7 +3932,7 @@
"issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues",
"source": "https://github.com/Yoast/PHPUnit-Polyfills"
},
"time": "2022-11-16T09:07:52+00:00"
"time": "2023-08-19T14:25:08+00:00"
}
],
"aliases": [],
@ -3934,11 +3941,11 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": ">=7.3"
"php": ">=7.4"
},
"platform-dev": [],
"platform-overrides": {
"php": "7.3"
"php": "7.4"
},
"plugin-api-version": "2.3.0"
}

View File

@ -8,7 +8,6 @@
use Automattic\Jetpack\Constants;
use Automattic\WooCommerce\Internal\Utilities\Users;
use Automattic\WooCommerce\Internal\Traits\AccessiblePrivateMethods;
defined( 'ABSPATH' ) || exit;
@ -17,8 +16,6 @@ defined( 'ABSPATH' ) || exit;
*/
class WC_Admin_Notices {
use AccessiblePrivateMethods;
/**
* Stores notices.
*
@ -57,7 +54,6 @@ class WC_Admin_Notices {
add_action( 'woocommerce_installed', array( __CLASS__, 'reset_admin_notices' ) );
add_action( 'wp_loaded', array( __CLASS__, 'add_redirect_download_method_notice' ) );
add_action( 'admin_init', array( __CLASS__, 'hide_notices' ), 20 );
self::add_action( 'admin_init', array( __CLASS__, 'maybe_remove_php74_required_notice' ) );
// @TODO: This prevents Action Scheduler async jobs from storing empty list of notices during WC installation.
// That could lead to OBW not starting and 'Run setup wizard' notice not appearing in WP admin, which we want
@ -120,53 +116,8 @@ class WC_Admin_Notices {
self::add_notice( 'template_files' );
self::add_min_version_notice();
self::add_maxmind_missing_license_key_notice();
self::maybe_add_php74_required_notice();
}
// phpcs:disable Generic.Commenting.Todo.TaskFound
/**
* Add an admin notice about the bump of the required PHP version in WooCommerce 8.2
* if the current PHP version is too old.
*
* TODO: Remove this method in WooCommerce 8.2.
*/
private static function maybe_add_php74_required_notice() {
if ( version_compare( phpversion(), '7.4', '>=' ) ) {
return;
}
self::add_custom_notice(
'php74_required_in_woo_82',
sprintf(
'%s%s',
sprintf(
'<h4>%s</h4>',
esc_html__( 'PHP version requirements will change soon', 'woocommerce' )
),
sprintf(
// translators: Placeholder is a URL.
wpautop( wp_kses_data( __( 'WooCommerce 8.2, scheduled for <b>October 2023</b>, will require PHP 7.4 or newer to work. Your server is currently running an older version of PHP, so this change will impact your store. Upgrading to at least PHP 8.0 is recommended. <b><a href="%s">Learn more about this change.</a></b>', 'woocommerce' ) ) ),
'https://developer.woocommerce.com/2023/06/05/new-requirement-for-woocommerce-8-2-php-7-4/'
)
)
);
}
/**
* Remove the admin notice about the bump of the required PHP version in WooCommerce 8.2
* if the current PHP version is good.
*
* TODO: Remove this method in WooCommerce 8.2.
*/
private static function maybe_remove_php74_required_notice() {
if ( version_compare( phpversion(), '7.4', '>=' ) && self::has_notice( 'php74_required_in_woo_82' ) ) {
self::remove_notice( 'php74_required_in_woo_82' );
}
}
// phpcs:enable Generic.Commenting.Todo.TaskFound
/**
* Show a notice.
*

View File

@ -27,7 +27,7 @@
<!-- Configs -->
<config name="minimum_supported_wp_version" value="5.2" />
<config name="testVersion" value="7.3-" />
<config name="testVersion" value="7.4-" />
<!-- Rules -->
<rule ref="WooCommerce-Core" />

View File

@ -3,7 +3,7 @@ Contributors: automattic, mikejolley, jameskoster, claudiosanches, rodrigosprimo
Tags: online store, ecommerce, shop, shopping cart, sell online, storefront, checkout, payments, woo, woo commerce, e-commerce, store
Requires at least: 6.2
Tested up to: 6.3
Requires PHP: 7.3
Requires PHP: 7.4
Stable tag: 8.0.2
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
@ -136,7 +136,7 @@ Check out [Frequently Asked Questions](https://docs.woocommerce.com/document/fre
= Minimum Requirements =
* PHP 7.3 or greater is required (PHP 8.0 or greater is recommended)
* PHP 7.4 or greater is required (PHP 8.0 or greater is recommended)
* MySQL 5.6 or greater, OR MariaDB version 10.1 or greater, is required
Visit the [WooCommerce server requirements documentation](https://docs.woocommerce.com/document/server-requirements/?utm_source=wp%20org%20repo%20listing&utm_content=3.6) for a detailed list of server requirements.

View File

@ -9,7 +9,7 @@
* Text Domain: woocommerce
* Domain Path: /i18n/languages/
* Requires at least: 6.2
* Requires PHP: 7.3
* Requires PHP: 7.4
*
* @package WooCommerce
*/