From 6c1c23bc7d405606de4a6a0f6685a5ca0b728550 Mon Sep 17 00:00:00 2001 From: jmnote Date: Sun, 6 Sep 2026 15:41:45 +0900 Subject: [PATCH] Makefile: auto-run composer install before phpcs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `phpcs` (and so `make checks`) needs vendor/ (parallel-lint, phpcs, minus-x), but until now that meant remembering to run `composer install` yourself first — skip it and `make checks` failed with "parallel-lint: not found" instead of a clear error. `phpcs` now depends on the vendor/autoload.php file target, which runs `composer install` whenever it's missing or composer.json is newer, so `make checks` works on a fresh checkout without an extra manual step. Co-Authored-By: Claude Sonnet 5 --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f08e3765..4357317f 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,11 @@ checks: test phpcs ## Everything CI runs before merging (needs `composer install test: ## Run the pure-PHP test suites php tests/QuotesTest.php -phpcs: ## parallel-lint + minus-x + phpcs against the MediaWiki coding standard +phpcs: vendor/autoload.php ## parallel-lint + minus-x + phpcs against the MediaWiki coding standard composer test +vendor/autoload.php: composer.json + composer install --no-progress + mathjax: ## Pin the local MathJax submodule + CDN major version, e.g. `make mathjax MATHJAX_VERSION_LOCAL=4.1.3 MATHJAX_VERSION_CDN=4` hack/mathjax.sh $(MATHJAX_VERSION_LOCAL) $(MATHJAX_VERSION_CDN)