문제

This is the scenario.

You have package A and package B in your composer.json (your app depends on this 2 packages).

Both package A and B depend on package C, but on different versions. Say A depend on C v2.1, and B depends on C v2.2.

And you get version conflicts.

Both A, B and C are third party packages.

How to resolve this?

도움이 되었습니까?

해결책

This is a hack but will probably let you move forward.

You could overwrite repositories for "A", "B" and "C" packages and make that "A" and "B" rely on the same version of "C" (actually, might be that it's enough to overwrite repositories for "A" and "B" only).

This should work as long as both "A" and "B" can work with the latest version of "C" (so probably a maintainer didn't update the package version). If it's the case I'd also consider sending a pull request to the project which has an older version of a dependency.

다른 팁

We are discussing it in this mailing list : http://news.php.net/php.internals/72594

"No-conflict" technique must be implemented in PHP , it's not a composer fault

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top