8000 [Feature Request] prefer lowest mode for non-dev deps only · Issue #6856 · composer/composer · GitHub
[go: up one dir, main page]

Skip to content
[Feature Request] prefer lowest mode for non-dev deps only  #6856
@frankdejonge

Description

@frankdejonge

For some of my projects I've got quite a wide range of supported PHP versions. Due to PHP version upgrades it's hard (and sometimes even simply impossible) to use phpunit. For example, I'm supporting 5.6 to 7.2 for a library. In order to support 5.6 I need my lower bound to be low enough to find a phpunit version (or dep of) that supports 5.6, but it also needs to be high enough for any breaking changes in 7.2 to be patched. This turned out not to be possible unfortunately.

BUT! If composer would allow for the lowest version only to be preferred for the non-dev dependencies this would work out way easier and makes it easier to support older version of packages. The lowest version supported is great for dependencies you need at runtime but actually provide little value during dev time. Package maintainers want to support and test things to ensure production usage, not development usage most of the time.

What do you think about this? If accepted I'm perfectly willing to put in the time to figure out how to implement this and create a PR for this, but I wanted to get all of your opinions in first so no energy is wasted on this for no reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0