Replies: 1 comment 2 replies
-
The way to do this IMO is to require one of the virtual packages like: psr/http-factory-implementation: 1.0 This will force the user to pick one of the packages providing it, and Composer will suggest providers.. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The idea is to provide a set of related dependencies and composer installs one of them if none of them are installed.
Example, I wrote a program that needs an PSR7 message class and the program supports this (In order of preference):
The idea is, composer verify if one of this packages is installed, if yes, it does nothing, if not, it try to install first package, if it can be installed because conflicts, go to the next, until found one installable. If none is installable, composer will report an unresolvable dependency error.
Beta Was this translation helpful? Give feedback.
All reactions