運行此composer require intervention/image
拋出這個錯誤:作曲家依賴衝突
Using version ^2.3 for intervention/image
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install intervention/image 2.3.1
- Conclusion: don't install intervention/image 2.3.2
- Installation request for intervention/image ^2.3 -> satisfiable by intervention/image[2.3.0, 2.3.1, 2.3.2].
- intervention/image 2.3.0 requires guzzlehttp/psr7 ~1.1 -> satisfiable by guzzlehttp/psr7[1.1.0, 1.2.0].
- guzzlehttp/psr7 1.1.0 requires psr/http-message ~1.0 -> satisfiable by psr/http-message[1.0].
- guzzlehttp/psr7 1.2.0 requires psr/http-message ~1.0 -> satisfiable by psr/http-message[1.0].
- Conclusion: don't install psr/http-message 1.0
Installation failed, reverting ./composer.json to its original content.
所以它是由暴食引起的(我使用"guzzlehttp/guzzle": "~5.3"
)。但是我不能(或者不想)將guzzle更新爲6.0,因爲它不是向後兼容的,所以我必須移動很多代碼。我能做些什麼,比如訣竅嗎,還是必須更新guzzlehttp/guzzle
或intervention/image
?
你的依賴在你的主應用上使用Guzzle嗎?如果他們指定兩個不同版本的Guzzle,你可能會遇到這個問題。 – Zarathuztra