poser: run composer update instead of install, enabling --prefer-lowest - #182
Merged
Conversation
composer.contrib.lock is removed at the end of every poser run, so 'composer install' never had a lock to install from and always fell back to a full update. Invoking 'composer update' directly is behavior-identical, and it accepts update-only flags such as --prefer-lowest, enabling lowest-dependency testing: ddev poser --prefer-lowest --prefer-stable Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
weitzman
commented
Aug 30, 2026
… ddev core-version in README example Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Changes
ddev poserto runcomposer update "$@"instead ofcomposer install "$@", updates the README, and adds a bats test.Why
composer.contrib.lockis removed at the end of every poser run, socomposer installnever had a lock to install from — Composer printed "No composer.lock file present. Updating dependencies to latest instead of installing from lock file." and performed a full update anyway. Invokingupdatedirectly is behavior-identical for every existing use.What it adds:
updateaccepts update-only flags thatinstallrejects (The "--prefer-lowest" option does not exist.), so lowest-dependency testing now works with the same command contributors already use:Paired with a core floor (
ddev dotenv set .ddev/.env.web --drupal-core '~10.3.0'), this lets a contrib project verify the floors of its composer constraints locally and in CI.Test
New bats test runs
ddev poser --prefer-lowest --prefer-stable --dry-runafter the regular poser test.--dry-runkeeps it cheap — it proves resolution with update-only flags without downloading a second dependency set, and it would fail under the previouscomposer installinvocation.🤖 Generated with Claude Code