repo/lockfile-committed/php
Dependency lockfile is committed
Implements repo/lockfile-committed for php.
| Severity | error |
| Tiers | 1, 2 |
| Stacks | php |
| Scope | each |
| Kind | expr |
| Source | library v0.6.0 |
| Selected by | fleetlint-recommended@v0.6.0 |
Requirement
composer.lock is tracked when composer.json requires packages.
Why
Builds are reproducible only when dependency versions are pinned in git.
Check
"composer.lock" in tracked() || !text("composer.json").contains("\"require")Fix
Run composer update --lock (or composer install) and commit composer.lock.
Agent instruction: Run the package manager to produce the lockfile, remove any .gitignore entry for it, and commit it.
A finding of this rule points at composer.lock.
Sources
- https://github.com/ossf/package-manager-best-practices/blob/main/published/npm.md (guidance)
- https://fleetlint.org/baseline/#dependencies (convention)
- https://getcomposer.org/doc/01-basic-usage.md (spec)
- https://fleetlint.org/stacks/#php
Generated by fleetlint docs from catalog v0.6.0.