当我尝试安装 Mink (使用composer require --dev behat/mink
)时,收到消息:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- behat/mink v1.7.1 requires symfony/css-selector ~2.1|~3.0 -> no matching package found.
- behat/mink v1.7.0 requires symfony/css-selector ~2.1 -> no matching package found.
- Installation request for behat/mink ^1.7 -> satisfiable by behat/mink[v1.7.0, v1.7.1].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content
我发现与symfony/css-selector
存在冲突。
如果我运行composer show symfony/css-selector
,显示的版本是 v4.2.1 ,所以我认为这是问题所在。
此外,当我运行composer why symfony/css-selector
时,它返回:
symfony/test-pack v1.0.5 requires symfony/css-selector (*)
有什么方法可以解决此冲突而不删除symfony/test-pack
?
答案 0 :(得分:1)
根据https://github.com/minkphp/Mink/pull/749#issuecomment-351402449,Mink支持Symfony 4,但尚未发布。您可以使用"behat/mink": "~1.7@dev"
安装最新的开发人员代码以进行试用。