The Game Panel Design record
The Game Panel
ADR-0015 Accepted

Dependencies are locked Lock dependencies and Composer is pinnedpin Composer

Comparing
v1 to v2
Current
Read the document

Context

composer.lock is gitignored, and every CI job runs composer self-update && composer install && composer dump-autoload. Each run resolves dependencies freshafresh, against a Composer binary that also movesmoves as well. A transitive release can turn the build red overnight with no local change, and PHPStan or php-cs-fixer can behave differently differently in CI CI than they do locally.

Committing the lock file is the standard, recommended practice for a project: everyone who sets up the projectproject up, CI included, then runs on exactly the same dependency versions.

Decision

I will commit composer.lock is committed, and have CI installs install from it with composer install --no-interaction --no-progress. CI runs will run a pinned Composer version, matching the same one used locally, and the pin is changed will only change deliberately.

Alternatives

Resolving dependencies fresh afresh on every CI run, with the lock file ignored and Composer self-updatedupdating itself first. It lets builds I rejected this because it lets a build break with no local change, and lets tools behave differently in CI than they do locally.

No other arrangement was weighed.

Consequences

Easier:

  • Every CI job will install the dependency versions in the committed lock file, the same ones used locally, so a a build will not not break without a local change and tools will behave the same in CI as they do locally.
  • CI will no longer need composer dump-autoload will no longer be needed in CI, since composer install generates the autoloader.

Harder:

  • Updating Composer will be a deliberate change to the pin. A vulnerable Composer will stay pinned until someone moves someone moves it, so Composer's security releases will need acting on.

Constrained:

  • Declared The declared lower bounds of dependencies will not be tested. A --prefer-lowest matrix leg, keeping leg to keep them honest, will honest will be a separate separate change.

Sources

  • PR #50, chore(engine): Tooling, CI and documentation cleanup, opened and merged , squashed as squashed as 54dcfb0: the problem, the decision, the alternative and the consequences other than Composer's security security releases. . Its commit message and diff record the lock file and pin changes. created is when it was opened and and decided when when it merged.
  • PR #75, chore: Rename package, add licence and patch Composer CVE, merged and squashed as 3372f20: the : the consequence for Composer's security releases, taken from what followed rather than anticipated. It moved the the pin from from 2.9.3 to 2.10.3 because 2.9.3 is inside the range affected by CVE-2026-84361, which had left CI running running a Composer Composer open to arbitrary command execution through a package's Perforce source URL.
  • Composer documentation, Basic usage, "Commit your composer.lock file to version control", read : committing the lock file as the standard practice for projects, and why.

Source adr/0015-locked-dependencies.md · commit 9444a99 · published