build: manage psalm and box via composer in tools/ instead of committed phars#659
Merged
Merged
Conversation
Replace the phars committed in bin/ with per-tool composer projects in tools/psalm and tools/box. Each has its own isolated vendor tree, so a tool's dependencies (e.g. psalm's own nikic/php-parser) cannot conflict with arkitect's — the reason the phar approach was chosen in #450 — while Dependabot now covers tool updates via the new composer entries, and the repo stops accumulating multi-MB binary blobs in its history. Platform pins in the tools' composer.json keep the lock files resolved for the oldest runtime each tool runs on in CI (8.0 for psalm, 8.2 for box). Tool versions are unchanged: psalm stays on 5.26 (the upgrade to Psalm 6 is a separate change), box was already at the latest 4.7. The gitignore composer.lock pattern is anchored to the root: the root lock stays uncommitted by design (library), while the tools' lock files are committed so installs are reproducible and Dependabot can update them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #659 +/- ##
=========================================
Coverage 98.28% 98.28%
Complexity 737 737
=========================================
Files 94 94
Lines 2100 2100
=========================================
Hits 2064 2064
Misses 36 36 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces the psalm and box phars committed in
bin/with two small composer projects,tools/psalmandtools/box, each with its own committed lock file.Why. The phars are outside every update mechanism we have: nothing watches them, so
psalm.pharhas been stuck at the version committed in #450 and today it cannot even start on PHP >= 8.4 dev machines (its embedded requirements checker stops at 8.3). As composer projects the tools are now covered by Dependabot (two new entries independabot.yml), which also means security advisories for them are surfaced like for any other dependency. As a bonus, the repo stops accumulating multi-MB binary blobs in its git history on every tool update, and tool provenance moves from "binary committed by hand" to packages resolved from Packagist with a lock file.Why this still avoids the problem #450 solved. Psalm was moved out of
require-devbecause its own dependencies (e.g. itsnikic/php-parser) conflict with arkitect's. Thetools/directories keep that property: each tool has an isolated vendor tree, nothing is shared with the root project.What changes. Tool versions are unchanged (psalm stays on 5.26, box was already at the latest 4.7),
make psalm/make phar/make buildkeep working the same way (they runcomposer install -d tools/...first, a fast no-op when up to date), and the CI psalm step still runs on the 8.0 job. Platform pins in the tools'composer.jsonkeep the lock files resolved for the oldest runtime each tool runs on in CI (8.0 for psalm, 8.2 for box). The.gitignorecomposer.lockpattern is anchored to the root so the tools' locks are tracked while the root lock stays uncommitted by design.The upgrade to Psalm 6 is deliberately left out of this PR and will follow as a separate one (branch
chore/upgrade-psalm-6), since it brings its own config decisions and code fixes.🤖 Generated with Claude Code