As a follow up to #1931198: Add conflict detection when different modules require different versions of the same package, it would be great to have a mechanism in the UI that can resolve dependencies and override the versions set in the composer.json files.

Comments

cpliakas’s picture

Component: Miscellaneous » Code
cpliakas’s picture

Title: Add conflict resolution and version overrides » Add the ability to override package versions via the UI and add other requirements

Changing title.

RobLoach’s picture

This is an interesting idea, as you'd think the module should determine which version of the package gets installed rather than the user.

In any case, happy birthday!

cpliakas’s picture

In any case, happy birthday!

Thanks! 31, act like 13.

as you'd think the module should determine which version of the package gets installed rather than the user.

Normally, yes. However, there are two use cases where this would be useful.

1) On hosting providers that are stuck on PHP <5.3.3 there may be instances where you have to use a package with a lower requirement. Take Git Wrapper. The library requires some Symfony components that would normally resolve to the 2.2.* version. The problem is that these components require PHP >= 5.3.3, so they potentially wouldn't work on the hosting providers mentioned above. Since Git Wrapper works with versions ~2.0, the user should be able to say "I want to 2.0.*".
2) If a module requires version "1.0.1" of a library and another module requires "1.0.2" of a library, the user should be able to say "use 1.0.1 (or 1.0.2)" without having to patch one of the modules.

Let me know if these don't make sense.
Chris

Grayside’s picture

I thought the idea is Composer resolves that problem, and if one module happens to be compatible with the different library version, it's compatibility specification should be changed. E.g., you don't resolve this conflict locally, you submit a pull request.

cpliakas’s picture

I thought the idea is Composer resolves that problem

For dependency conflicts, yes, but this is when different modules have different requirements for the same package. Since Composer Manager has to merge the requirements into one, which version does it honor? This is a step before Composer has a crack at it.

cpliakas’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes

Flagging for the 2.x branch.