Commit 91fdc13d2ab for woocommerce
commit 91fdc13d2ab954232c28a736e22d62c485b0d8b9
Author: Vlad Olaru <vlad.olaru@automattic.com>
Date: Thu Nov 5 10:56:13 2026 +0200
[ci] Skip JavaScript dependency installation for PHPStan (#70519)
ci: Skip JavaScript dependency installation for PHPStan
PHPStan only needs the Composer dependency graph, but setup currently
installs the plugin JavaScript workspace to reach its postinstall step.
Use the existing Composer cache input and run Composer directly with
scripts enabled. Retain PHP 8.4, the analyzer wrapper, annotations,
result caching and baseline checks.
Two hosted paired trials saved 33.79 and 42.38 seconds of setup with
matching dependency inventories, autoload maps and analysis results.
diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml
index 5fa04b6b6b7..9f2227f4726 100644
--- a/.github/workflows/phpstan.yml
+++ b/.github/workflows/phpstan.yml
@@ -25,10 +25,14 @@ jobs:
- uses: './.github/actions/setup-woocommerce-monorepo'
id: 'setup-monorepo'
with:
- install: '@woocommerce/plugin-woocommerce...'
- pull-package-deps: '@woocommerce/plugin-woocommerce'
+ install: 'false'
+ pull-package-composer-deps: '@woocommerce/plugin-woocommerce'
php-version: '8.4'
+ - name: 'Install PHP dependencies'
+ working-directory: plugins/woocommerce
+ run: XDEBUG_MODE=off composer install --quiet
+
- name: 'Run PHPStan rule tests'
working-directory: plugins/woocommerce
run: composer test:phpstan-rules