From 59496f73b2985499fd6c4d0ace4a5f2908a12ac9 Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Thu, 20 Nov 2025 14:52:56 -0700 Subject: [PATCH 1/2] Run against WooCommerce 7.0 stubs --- .github/workflows/linting.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index f8352a1d2cddf..42ad7e50951c8 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -718,12 +718,16 @@ jobs: done - name: Run phan run: pnpm jetpack phan --all -v --update-baseline --format github - - name: Run phan for previous WP version too + - name: Run phan for previous WP version and old Woo env: # Don't bother complaining about unused suppressions that may be used with the newer stubs. See .phan/config.base.php for how this gets applied. NO_PHAN_UNUSED_SUPPRESSION: 1 + # 2025-11-20: We have to draw the line somewhere. Let's go with Woo 7.0. + WOO_VERSION: 7 run: | - composer update --prefer-lowest php-stubs/wordpress-stubs php-stubs/wordpress-tests-stubs + # We can't directly downgrade Woo stubs with `update` due to existing constraints + composer require --no-update --dev "php-stubs/woocommerce-stubs:${WOO_VERSION}" + composer update --prefer-lowest php-stubs/wordpress-stubs php-stubs/wordpress-tests-stubs php-stubs/woocommerce-stubs # Don't re-update baselines here, only check. pnpm jetpack phan --all -v --format github - name: Check baselines From e53acbb52751c320b3046f8aea070e9cfab8c89e Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Thu, 20 Nov 2025 15:08:33 -0700 Subject: [PATCH 2/2] Change Woo stubs constraints so we can simplify things --- .github/workflows/linting.yml | 6 +--- composer.json | 2 +- composer.lock | 52 +++++++++++++++++------------------ 3 files changed, 28 insertions(+), 32 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 42ad7e50951c8..ea82c89b74705 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -690,7 +690,7 @@ jobs: phan: name: Static analysis runs-on: ubuntu-latest - timeout-minutes: 20 # 2024-05-02: Up to about 8 minutes now that we're running against the old WP stubs too. + timeout-minutes: 25 # 2025-11-20: Up to about 10 minutes now that we're running against the old WP and Woo stubs too. steps: - uses: GitHubSecurityLab/actions-permissions/monitor@v1 with: @@ -722,11 +722,7 @@ jobs: env: # Don't bother complaining about unused suppressions that may be used with the newer stubs. See .phan/config.base.php for how this gets applied. NO_PHAN_UNUSED_SUPPRESSION: 1 - # 2025-11-20: We have to draw the line somewhere. Let's go with Woo 7.0. - WOO_VERSION: 7 run: | - # We can't directly downgrade Woo stubs with `update` due to existing constraints - composer require --no-update --dev "php-stubs/woocommerce-stubs:${WOO_VERSION}" composer update --prefer-lowest php-stubs/wordpress-stubs php-stubs/wordpress-tests-stubs php-stubs/woocommerce-stubs # Don't re-update baselines here, only check. pnpm jetpack phan --all -v --format github diff --git a/composer.json b/composer.json index 9c50e9cf19fc3..3ba3276d29906 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", "phan/phan": "5.5.2", "php-parallel-lint/php-parallel-lint": "^1.4.0", - "php-stubs/woocommerce-stubs": ">=8.7", + "php-stubs/woocommerce-stubs": ">=7.0", "php-stubs/wordpress-stubs": ">=6.7", "php-stubs/wordpress-tests-stubs": ">=6.7", "php-stubs/wp-cli-stubs": "^2.10", diff --git a/composer.lock b/composer.lock index 87d610837dd18..7016321a7f954 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "e1e22a8327da8a3404d82f3ba930f281", + "content-hash": "b04ff76322c12d38af630ee4b7633fe0", "packages": [], "packages-dev": [ { @@ -607,29 +607,29 @@ }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v1.1.2", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/composer-installer.git", - "reference": "e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1" + "reference": "845eb62303d2ca9b289ef216356568ccc075ffd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1", - "reference": "e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/845eb62303d2ca9b289ef216356568ccc075ffd1", + "reference": "845eb62303d2ca9b289ef216356568ccc075ffd1", "shasum": "" }, "require": { "composer-plugin-api": "^2.2", "php": ">=5.4", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + "squizlabs/php_codesniffer": "^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "^2.2", "ext-json": "*", "ext-zip": "*", "php-parallel-lint/php-parallel-lint": "^1.4.0", - "phpcompatibility/php-compatibility": "^9.0", + "phpcompatibility/php-compatibility": "^9.0 || ^10.0.0@dev", "yoast/phpunit-polyfills": "^1.0" }, "type": "composer-plugin", @@ -699,7 +699,7 @@ "type": "thanks_dev" } ], - "time": "2025-07-17T20:45:56+00:00" + "time": "2025-11-11T04:32:07+00:00" }, { "name": "doctrine/deprecations", @@ -1085,16 +1085,16 @@ }, { "name": "php-stubs/woocommerce-stubs", - "version": "v10.3.4", + "version": "v10.3.5", "source": { "type": "git", "url": "https://github.com/php-stubs/woocommerce-stubs.git", - "reference": "1692c7de7f6d8b92bf71c22093b3e89068f7cd7d" + "reference": "4758987631eaa4cce89781bffb4ae7602d00a4cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/woocommerce-stubs/zipball/1692c7de7f6d8b92bf71c22093b3e89068f7cd7d", - "reference": "1692c7de7f6d8b92bf71c22093b3e89068f7cd7d", + "url": "https://api.github.com/repos/php-stubs/woocommerce-stubs/zipball/4758987631eaa4cce89781bffb4ae7602d00a4cd", + "reference": "4758987631eaa4cce89781bffb4ae7602d00a4cd", "shasum": "" }, "require": { @@ -1123,9 +1123,9 @@ ], "support": { "issues": "https://github.com/php-stubs/woocommerce-stubs/issues", - "source": "https://github.com/php-stubs/woocommerce-stubs/tree/v10.3.4" + "source": "https://github.com/php-stubs/woocommerce-stubs/tree/v10.3.5" }, - "time": "2025-10-31T22:13:04+00:00" + "time": "2025-11-13T23:04:57+00:00" }, { "name": "php-stubs/wordpress-stubs", @@ -1705,16 +1705,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.3", + "version": "5.6.4", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94f8051919d1b0369a6bcc7931d679a511c03fe9" + "reference": "90a04bcbf03784066f16038e87e23a0a83cee3c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94f8051919d1b0369a6bcc7931d679a511c03fe9", - "reference": "94f8051919d1b0369a6bcc7931d679a511c03fe9", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/90a04bcbf03784066f16038e87e23a0a83cee3c2", + "reference": "90a04bcbf03784066f16038e87e23a0a83cee3c2", "shasum": "" }, "require": { @@ -1763,22 +1763,22 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.3" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.4" }, - "time": "2025-08-01T19:43:32+00:00" + "time": "2025-11-17T21:13:10+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" + "reference": "8cbe6100e8971efbf8e2e7da3a202ba83eafd5a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", - "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/8cbe6100e8971efbf8e2e7da3a202ba83eafd5a3", + "reference": "8cbe6100e8971efbf8e2e7da3a202ba83eafd5a3", "shasum": "" }, "require": { @@ -1821,9 +1821,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.11.0" }, - "time": "2024-11-09T15:12:26+00:00" + "time": "2025-11-19T20:28:58+00:00" }, { "name": "phpstan/phpdoc-parser",