Skip to content

Fix 10 laravel build failures: set COMPOSER_ROOT_VERSION to bypass testbench-core conflict - #8

Open
aorwall wants to merge 2 commits into
mainfrom
fix/laravel-composer-root-version
Open

Fix 10 laravel build failures: set COMPOSER_ROOT_VERSION to bypass testbench-core conflict#8
aorwall wants to merge 2 commits into
mainfrom
fix/laravel-composer-root-version

Conversation

@aorwall

@aorwall aorwall commented Apr 21, 2026

Copy link
Copy Markdown
Member

Problem

10 laravel__framework-* images fail at composer install because orchestra/testbench-core (dev dep) declares a conflict on laravel/framework versions it wasn't tested agains.

The generator clones laravel at a detached commit (no tag), so composer falls back to the branch-alias (11.x-dev) as the root version — which sits inside those conflict ranges. The solver aborts and the image build fails.

Why only these 10

Three conditions must coincide: (1) root cloned without a tag, (2) a transitive dep that declares a conflict against the root's own name, (3) the root's fallback version sits inside that conflict range. That combination is unique to recent laravel + modern testbench in this dataset. Older laravel instances (46234, 48573, 48636) pin testbench v8.12.1, which predates the conflict guard, and other PHP repos (carbon, phpspreadsheet, php-cs-fixer) have no transitive dep that cares about their root version.

Fix

Set COMPOSER_ROOT_VERSION=12.50.0 before composer install. Composer then reports the root as 12.50.0 — outside every testbench conflict range — and the solver proceeds.

Documented workaround for detached-HEAD dev checkouts.

aorwall and others added 2 commits April 20, 2026 08:20
…bench ↔ laravel-13 conflict

10 laravel/framework instances (51195..53949) were failing composer
install because the composer.lock pins orchestra/testbench-core v10.9.0,
which declares `conflict: laravel/framework <12.40.0|>=13.0.0`. The
root package's branch-alias `dev-master: 11.x-dev` resolves to
11.0.0.0-dev, which satisfies <12.40.0 and therefore trips the conflict.

Setting COMPOSER_ROOT_VERSION=12.50.0 tells composer to treat the root
package as 12.50.0 (inside testbench's allowed 12.40.0..13.0.0 range)
only for the purposes of this install invocation — no change to
composer.json or composer.lock, no change to the test execution path.

Applied to: 51195, 51890, 52451, 52680, 52684, 52866, 53206, 53696,
53914, 53949.
Previous commit patched the 10 laravel Dockerfiles directly to prepend
`export COMPOSER_ROOT_VERSION=12.50.0` before `composer install`. That
made the committed Dockerfiles drift from the generator source.

This commit adds the same line to the `install` list in the 10 corresponding
SPECS_LARAVEL_FRAMEWORK entries so regeneration produces the fix, then
re-runs the generator on those 10 instances. The resulting Dockerfiles are
byte-identical in content to the previous commit, except the heredoc
delimiter is refreshed (blake2b of the new heredoc content).

Instances: 51195, 51890, 52451, 52680, 52684, 52866, 53206, 53696, 53914, 53949.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant