Skip to content

Conversation

@nicolas-grekas
Copy link
Contributor

@nicolas-grekas nicolas-grekas commented Oct 30, 2025

After a brainstorming session with @Seldaek, this is #12581 again, but behind an env var.

From the added doc:

COMPOSER_PREFER_DEV_OVER_PRERELEASE

If set to 1, when resolving dependencies with both --prefer-stable and
--prefer-lowest enabled, dev versions are treated as more stable than
alpha/beta/RC versions in cases where no stable release exists. This is useful
to test lowest versions while still preferring branches that may contain
critical fixes over pre-release tags.

@nicolas-grekas nicolas-grekas changed the title Add COMPOSER_PREFER_DEV_OVER_UNSTABLE env var Add COMPOSER_PREFER_DEV_OVER_PRERELEASE env var Oct 30, 2025
@Seldaek Seldaek added this to the 2.9 milestone Oct 31, 2025
@Seldaek Seldaek merged commit 8851f9d into composer:main Oct 31, 2025
20 of 21 checks passed
@Seldaek
Copy link
Member

Seldaek commented Oct 31, 2025

Thanks

@nicolas-grekas nicolas-grekas deleted the dev-stable-lowest branch October 31, 2025 14:20
@nicolas-grekas
Copy link
Contributor Author

Cool! Thanks to the both of you!

nicolas-grekas added a commit to symfony/flex that referenced this pull request Oct 31, 2025
…e (nicolas-grekas)

This PR was merged into the 2.x branch.

Discussion
----------

Leverage COMPOSER_PREFER_DEV_OVER_PRERELEASE when possible

This leverages composer/composer#12585

The code added in #1066 remains as a fallback.

Commits
-------

cc37c66 Leverage COMPOSER_PREFER_DEV_OVER_PRERELEASE when possible
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.

2 participants