Commit da692b12cd2 for woocommerce

commit da692b12cd233d55c877846f89e20de69a06f3ea
Author: Luigi Teschio <gigitux@gmail.com>
Date:   Thu Sep 17 14:37:23 2026 +0200

    Align E2E PHP coverage across routine and nightly checks (#68471)

    * Retry failed nightly jobs up to three attempts

    * Make nightly Slack attempt condition explicit

    * Explain shared Slack reporting behavior

    * Align E2E PHP coverage across routine and nightly checks

    * Add changelog entry for E2E PHP coverage

    * Preserve Core PHP 8.5 jobs on PR and release checks

    * remove files

    * Retry failed nightly jobs up to three attempts

    * Make nightly Slack attempt condition explicit

    * Explain shared Slack reporting behavior

    * Align E2E PHP coverage across routine and nightly checks

    * Preserve Core PHP 8.5 jobs on PR and release checks

    * remove files

diff --git a/plugins/woocommerce/changelog/dev-align-e2e-php-coverage b/plugins/woocommerce/changelog/dev-align-e2e-php-coverage
new file mode 100644
index 00000000000..87e9a6ffc39
--- /dev/null
+++ b/plugins/woocommerce/changelog/dev-align-e2e-php-coverage
@@ -0,0 +1,5 @@
+Significance: patch
+Type: dev
+Comment: Align E2E PHP coverage across routine and nightly CI checks.
+
+
diff --git a/plugins/woocommerce/package.json b/plugins/woocommerce/package.json
index 58ef04b3f3b..3c9ac2572d6 100644
--- a/plugins/woocommerce/package.json
+++ b/plugins/woocommerce/package.json
@@ -245,7 +245,7 @@
 					]
 				},
 				{
-					"name": "Core e2e tests - parallel",
+					"name": "Core e2e tests - parallel - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:core-parallel",
@@ -268,11 +268,15 @@
 						"uninstall.php"
 					],
 					"testEnv": {
-						"start": "env:e2e --debug"
+						"start": "env:e2e --debug",
+						"config": {
+							"phpVersion": "8.3"
+						}
 					},
 					"events": [
 						"pull_request",
 						"push",
+						"nightly-checks",
 						"release-checks",
 						"core-e2e"
 					],
@@ -283,7 +287,32 @@
 					}
 				},
 				{
-					"name": "Core e2e tests - serial",
+					"name": "Core e2e tests - parallel - PHP 7.4",
+					"testType": "e2e",
+					"usesSharedPluginBuild": true,
+					"command": "test:e2e:core-parallel",
+					"shardingArguments": [
+						"--shard=1/2",
+						"--shard=2/2"
+					],
+					"changes": [],
+					"testEnv": {
+						"start": "env:e2e --debug",
+						"config": {
+							"phpVersion": "7.4"
+						}
+					},
+					"events": [
+						"nightly-checks"
+					],
+					"report": {
+						"resultsBlobName": "core-e2e-report-php-7.4",
+						"resultsPath": "tests/e2e/test-results",
+						"allure": true
+					}
+				},
+				{
+					"name": "Core e2e tests - serial - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:core-serial",
@@ -306,11 +335,15 @@
 						"uninstall.php"
 					],
 					"testEnv": {
-						"start": "env:e2e --debug"
+						"start": "env:e2e --debug",
+						"config": {
+							"phpVersion": "8.3"
+						}
 					},
 					"events": [
 						"pull_request",
 						"push",
+						"nightly-checks",
 						"release-checks",
 						"core-e2e"
 					],
@@ -321,7 +354,32 @@
 					}
 				},
 				{
-					"name": "Core e2e tests - Gutenberg stable",
+					"name": "Core e2e tests - serial - PHP 7.4",
+					"testType": "e2e",
+					"usesSharedPluginBuild": true,
+					"command": "test:e2e:core-serial",
+					"shardingArguments": [
+						"--shard=1/2",
+						"--shard=2/2"
+					],
+					"changes": [],
+					"testEnv": {
+						"start": "env:e2e --debug",
+						"config": {
+							"phpVersion": "7.4"
+						}
+					},
+					"events": [
+						"nightly-checks"
+					],
+					"report": {
+						"resultsBlobName": "core-e2e-report-php-7.4",
+						"resultsPath": "tests/e2e/test-results",
+						"allure": true
+					}
+				},
+				{
+					"name": "Core e2e tests - Gutenberg stable - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:gb-stable",
@@ -339,7 +397,10 @@
 						"core-e2e-gutenberg"
 					],
 					"testEnv": {
-						"start": "env:e2e --debug"
+						"start": "env:e2e --debug",
+						"config": {
+							"phpVersion": "8.3"
+						}
 					},
 					"report": {
 						"resultsBlobName": "gutenberg-stable-e2e-report",
@@ -348,7 +409,7 @@
 					}
 				},
 				{
-					"name": "Core e2e tests - Gutenberg nightly",
+					"name": "Core e2e tests - Gutenberg nightly - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:gb-nightly",
@@ -365,7 +426,10 @@
 						"core-e2e-gutenberg"
 					],
 					"testEnv": {
-						"start": "env:e2e --debug"
+						"start": "env:e2e --debug",
+						"config": {
+							"phpVersion": "8.3"
+						}
 					},
 					"report": {
 						"resultsBlobName": "gutenberg-nightly-e2e-report",
@@ -374,7 +438,7 @@
 					}
 				},
 				{
-					"name": "Core e2e tests - (HPOS:off)",
+					"name": "Core e2e tests - (HPOS:off) - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:hpos-off",
@@ -392,7 +456,10 @@
 						"core-e2e-hpos-disabled"
 					],
 					"testEnv": {
-						"start": "env:e2e --debug"
+						"start": "env:e2e --debug",
+						"config": {
+							"phpVersion": "8.3"
+						}
 					},
 					"report": {
 						"resultsBlobName": "core-e2e-reports-hpos-disabled",
@@ -467,7 +534,7 @@
 					}
 				},
 				{
-					"name": "Core e2e tests - WP L-1 - serial",
+					"name": "Core e2e tests - WP L-1 - serial - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:core-serial",
@@ -484,7 +551,8 @@
 					"testEnv": {
 						"start": "env:e2e --debug",
 						"config": {
-							"wpVersion": "latest-1"
+							"wpVersion": "latest-1",
+							"phpVersion": "8.3"
 						}
 					},
 					"events": [
@@ -500,7 +568,7 @@
 					}
 				},
 				{
-					"name": "Core e2e tests - WP L-1 - parallel",
+					"name": "Core e2e tests - WP L-1 - parallel - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:core-parallel",
@@ -517,7 +585,8 @@
 					"testEnv": {
 						"start": "env:e2e --debug",
 						"config": {
-							"wpVersion": "latest-1"
+							"wpVersion": "latest-1",
+							"phpVersion": "8.3"
 						}
 					},
 					"events": [
@@ -533,7 +602,7 @@
 					}
 				},
 				{
-					"name": "Core e2e tests - WP pre-release - serial",
+					"name": "Core e2e tests - WP pre-release - serial - PHP 8.3",
 					"optional": true,
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
@@ -551,7 +620,8 @@
 					"testEnv": {
 						"start": "env:e2e --debug",
 						"config": {
-							"wpVersion": "prerelease"
+							"wpVersion": "prerelease",
+							"phpVersion": "8.3"
 						}
 					},
 					"events": [
@@ -567,7 +637,7 @@
 					}
 				},
 				{
-					"name": "Core e2e tests - WP pre-release - parallel",
+					"name": "Core e2e tests - WP pre-release - parallel - PHP 8.3",
 					"optional": true,
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
@@ -585,7 +655,8 @@
 					"testEnv": {
 						"start": "env:e2e --debug",
 						"config": {
-							"wpVersion": "prerelease"
+							"wpVersion": "prerelease",
+							"phpVersion": "8.3"
 						}
 					},
 					"events": [
@@ -854,7 +925,7 @@
 					}
 				},
 				{
-					"name": "Blocks e2e tests",
+					"name": "Blocks e2e tests - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks",
@@ -895,12 +966,13 @@
 					"testEnv": {
 						"start": "env:start:blocks",
 						"config": {
-							"phpVersion": "7.4"
+							"phpVersion": "8.3"
 						}
 					},
 					"events": [
 						"pull_request",
 						"push",
+						"nightly-checks",
 						"release-checks",
 						"blocks-e2e"
 					],
@@ -911,7 +983,79 @@
 					}
 				},
 				{
-					"name": "Blocks e2e tests - unified editor assets",
+					"name": "Blocks e2e tests - PHP 7.4",
+					"testType": "e2e",
+					"usesSharedPluginBuild": true,
+					"command": "test:e2e:blocks",
+					"shardingArguments": [
+						"--shard=1/10",
+						"--shard=2/10",
+						"--shard=3/10",
+						"--shard=4/10",
+						"--shard=5/10",
+						"--shard=6/10",
+						"--shard=7/10",
+						"--shard=8/10",
+						"--shard=9/10",
+						"--shard=10/10"
+					],
+					"changes": [],
+					"onlyForDependencies": [
+						"@woocommerce/block-library"
+					],
+					"testEnv": {
+						"start": "env:start:blocks",
+						"config": {
+							"phpVersion": "7.4"
+						}
+					},
+					"events": [
+						"nightly-checks"
+					],
+					"report": {
+						"resultsBlobName": "blocks-e2e-report-php-7.4",
+						"resultsPath": "tests/e2e/test-results",
+						"allure": true
+					}
+				},
+				{
+					"name": "Blocks e2e tests - PHP 8.5",
+					"testType": "e2e",
+					"usesSharedPluginBuild": true,
+					"command": "test:e2e:blocks",
+					"shardingArguments": [
+						"--shard=1/10",
+						"--shard=2/10",
+						"--shard=3/10",
+						"--shard=4/10",
+						"--shard=5/10",
+						"--shard=6/10",
+						"--shard=7/10",
+						"--shard=8/10",
+						"--shard=9/10",
+						"--shard=10/10"
+					],
+					"changes": [],
+					"onlyForDependencies": [
+						"@woocommerce/block-library"
+					],
+					"testEnv": {
+						"start": "env:start:blocks",
+						"config": {
+							"phpVersion": "8.5"
+						}
+					},
+					"events": [
+						"nightly-checks"
+					],
+					"report": {
+						"resultsBlobName": "blocks-e2e-report-php-8.5",
+						"resultsPath": "tests/e2e/test-results",
+						"allure": true
+					}
+				},
+				{
+					"name": "Blocks e2e tests - unified editor assets - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:unified-editor-assets",
@@ -950,7 +1094,7 @@
 					"testEnv": {
 						"start": "env:start:blocks",
 						"config": {
-							"phpVersion": "7.4"
+							"phpVersion": "8.3"
 						}
 					},
 					"events": [
@@ -963,7 +1107,7 @@
 					}
 				},
 				{
-					"name": "Blocks e2e tests - WP pre-release",
+					"name": "Blocks e2e tests - WP pre-release - PHP 8.3",
 					"optional": true,
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
@@ -998,7 +1142,7 @@
 					"testEnv": {
 						"start": "env:start:blocks",
 						"config": {
-							"phpVersion": "7.4",
+							"phpVersion": "8.3",
 							"wpVersion": "prerelease"
 						}
 					},
@@ -1015,7 +1159,7 @@
 					}
 				},
 				{
-					"name": "Blocks e2e tests - WP latest-1",
+					"name": "Blocks e2e tests - WP latest-1 - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks",
@@ -1049,7 +1193,7 @@
 					"testEnv": {
 						"start": "env:start:blocks",
 						"config": {
-							"phpVersion": "7.4",
+							"phpVersion": "8.3",
 							"wpVersion": "latest-1"
 						}
 					},
@@ -1096,7 +1240,7 @@
 					}
 				},
 				{
-					"name": "Core e2e tests - PayPal Standard",
+					"name": "Core e2e tests - PayPal Standard - PHP 8.3",
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:paypal-standard",
@@ -1113,7 +1257,10 @@
 						"core-e2e"
 					],
 					"testEnv": {
-						"start": "env:e2e --debug"
+						"start": "env:e2e --debug",
+						"config": {
+							"phpVersion": "8.3"
+						}
 					},
 					"report": {
 						"resultsBlobName": "core-e2e-report",
diff --git a/plugins/woocommerce/tests/e2e/README.md b/plugins/woocommerce/tests/e2e/README.md
index 2081c553575..2ff2a2d95a3 100644
--- a/plugins/woocommerce/tests/e2e/README.md
+++ b/plugins/woocommerce/tests/e2e/README.md
@@ -75,6 +75,14 @@ run `pnpm playwright test --help`
 The e2e test environment configuration can be found in the `.wp-env.e2e.json` file in the `plugins/woocommerce`
 folder (the `.wp-env.json` file configures the separate dev environment, and `.wp-env.test.json` the lean PHP-unit environment).

+### PHP coverage in CI
+
+See the [PHP version guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/docs/contribution/testing/php-version-coverage.md) for how to choose PHP versions and where they are covered by E2E and PHP unit tests.
+
+The policy lives in `config.ci.tests` in `plugins/woocommerce/package.json`, using each job's `events` and `testEnv.config.phpVersion`. PHP 7.4 and 8.5 have separate nightly entries and report names; the existing report names represent PHP 8.3. When updating the policy, keep the routine version aligned with store usage and update the latest nightly version as WooCommerce adopts a newer PHP release.
+
+Custom on-demand triggers run their selected jobs with the configured PHP version; `core-e2e-php-8.5` remains available for PHP 8.5. Tests against existing hosted sites also keep the host's PHP version. Local E2E environments continue to use `.wp-env.e2e.json`; set `WP_ENV_PHP_VERSION=8.3` when starting the environment to reproduce routine CI coverage.
+
 For more information on how to configure the test environment for `wp-env`, please check out
 the official [documentation](https://github.com/WordPress/gutenberg/tree/trunk/packages/env).