This may (should) have been asked before somewhere but I can't seem to find an answer. If someone provides a link I can delete this post!:
Just trying to get my head around some of composer's (probably applies to other package managers too) functionality.
Basically I just want to know what composer does in the following scenarios:
1.
My main project has a dependency:
"guzzlehttp/guzzle": "5.0.*",
My external bundle has a dependency on
"guzzlehttp/guzzle": "5.0.*",
Does composer install guzzlehttp/guzzle one time because it knows it only needs it once?
2. Same scenario but in the future if someone updates the main project to use:
"guzzlehttp/guzzle": "6.0.*",
Will composer now install 2 versions of guzzle (5 and 6) (I presume this is what it should do), or will it take the highest version (i.e. 6)? Also if there are 2 versions will this cause any conflicts because namespaces might be the same?
Thanks
Yes Composer can only install one version of each extension/package.
Because of answer 1: Composer would consider your main project and the external package as incompatible.
In this case you could