Skip to content

Makefile: auto-run composer install before phpcs - #74

Merged
jmnote merged 1 commit into
mainfrom
chore/auto-composer-install
Sep 6, 2026
Merged

Makefile: auto-run composer install before phpcs#74
jmnote merged 1 commit into
mainfrom
chore/auto-composer-install

Conversation

@jmnote

@jmnote jmnote commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

`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.

Tests

Verified on a clean checkout (`rm -rf vendor composer.lock`): `make checks` now installs automatically and passes. A second run doesn't re-install (vendor/autoload.php is already up to date).

🤖 Generated with Claude Code

`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 <[email protected]>
@jmnote
jmnote merged commit 7be193b into main Sep 6, 2026
2 checks passed
@jmnote
jmnote deleted the chore/auto-composer-install branch September 6, 2026 06:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c1c23bc7d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Makefile
composer test

vendor/autoload.php: composer.json
composer install --no-progress

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Refresh the ignored lock when requirements change

When an existing checkout already has the ignored composer.lock and a later revision changes composer.json (for example, bumps one of these exact dev-tool versions), this recipe runs but fails or installs stale versions because Composer still prioritizes the old lock. Composer's install documentation says it reads composer.lock when present and only falls back to composer.json when absent; a newly required package therefore produces “not present in the lock file” instead of making phpcs usable. Regenerate/remove the untracked lock or use the appropriate update operation when composer.json is newer.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant