[英]How to resolve dependency version conflict in composer?
I am currently developing a Laravel application which has following package requirements in composer.json 我目前正在开发Laravel应用程序,该应用程序在composer.json中具有以下软件包要求
"phpunit/phpunit": "~5.7",
"phpspec/phpspec": "2.5.*",
"sebastian/exporter": "~2.0"
Now, problem is that phpunit
requires exporter 2.0
and the package phpspec
requires exporter 1.0
. 现在,问题在于
phpunit
需要exporter 2.0
,而软件包phpspec
需要exporter 1.0
。
So, now these requirements are conflicting and I am unable to update the packages. 因此,现在这些要求相互矛盾,并且我无法更新软件包。
How should I resolve this conflict and install these packages? 我应该如何解决此冲突并安装这些软件包?
Note: I noticed that from the composer.json of phpspec
that it has requirements defined as ~1.0|~2.0
for exporter
. 注:我注意到,从该composer.json
phpspec
它有定义为需求~1.0|~2.0
用于exporter
。 So it should work with both but it doesn't seem to be working. 因此,它应该与两者都工作,但似乎不起作用。
为了拥有支持sebastian/exporter
2.x的phpspec版本,您必须使用3.2.2或更高版本 。
if phpspec
allows exporter ~1.0
then why don't you just use it 如果
phpspec
允许出口~1.0
那么你为什么不只是用它
"phpunit/phpunit": "~5.7",
"phpspec/phpspec": "2.5.*",
"sebastian/exporter": "~1.0"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.