Skip to content

poser: run composer update instead of install, enabling --prefer-lowest - #182

Merged
weitzman merged 2 commits into
ddev:mainfrom
weitzman:poser-composer-update
Aug 30, 2026
Merged

poser: run composer update instead of install, enabling --prefer-lowest#182
weitzman merged 2 commits into
ddev:mainfrom
weitzman:poser-composer-update

Conversation

@weitzman

Copy link
Copy Markdown
Collaborator

What

Changes ddev poser to run composer update "$@" instead of composer install "$@", updates the README, and adds a bats test.

Why

composer.contrib.lock is removed at the end of every poser run, so composer install never 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. Invoking update directly is behavior-identical for every existing use.

What it adds: update accepts update-only flags that install rejects (The "--prefer-lowest" option does not exist.), so lowest-dependency testing now works with the same command contributors already use:

ddev poser --prefer-lowest --prefer-stable

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-run after the regular poser test. --dry-run keeps it cheap — it proves resolution with update-only flags without downloading a second dependency set, and it would fail under the previous composer install invocation.

🤖 Generated with Claude Code

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>
Comment thread commands/web/poser Outdated
Comment thread tests/full.bats Outdated
Comment thread README.md Outdated
… ddev core-version in README example

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@weitzman
weitzman merged commit 1bc2866 into ddev:main Aug 30, 2026
6 checks passed
@weitzman
weitzman deleted the poser-composer-update branch August 30, 2026 19:50
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