Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
cpliakas CreditAttribution: cpliakas commentedComment #2
cpliakas CreditAttribution: cpliakas commentedChanging title.
Comment #3
RobLoachThis 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!
Comment #4
cpliakas CreditAttribution: cpliakas commentedThanks! 31, act like 13.
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
Comment #5
Grayside CreditAttribution: Grayside commentedI 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.
Comment #6
cpliakas CreditAttribution: cpliakas commentedFor 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.
Comment #7
cpliakas CreditAttribution: cpliakas commentedFlagging for the 2.x branch.