正在努力安装mink和behat,使用composer与symfony2一起使用



我正试图使用composer安装带有symfony 2.4的behat和mink,但我似乎无法将composer.json文件解析为一组可安装的包。

我使用上的命令安装了symfony2http://symfony.com/doc/current/book/installation.html

php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.4.*

下面是我的composer.json文件的require部分:

"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"behat/behat":  "2.4.*@stable",
"behat/mink":   "1.4.*@stable",
"behat/symfony2-extension":      "*",
"behat/mink-extension":          "*",
"behat/mink-browserkit-driver":  "*",
"behat/mink-selenium2-driver":   "*"
}

运行composer更新后,我在屏幕上收到以下消息:

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: remove symfony/symfony v2.4.0
- behat/mink v1.4.0 requires symfony/css-selector >=2.0.0,<2.2.0-dev -> satisfiable by symfony/symfony[2.0.7, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9], symfony/css-selector[2.0.4, 2.0.5, 2.0.6, 2.0.7, v2.0.10, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9].
- behat/mink v1.4.1 requires symfony/css-selector >=2.0,<2.3-dev -> satisfiable by symfony/symfony[2.0.7, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9], symfony/css-selector[2.0.4, 2.0.5, 2.0.6, 2.0.7, v2.0.10, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9].
- behat/mink v1.4.2 requires symfony/css-selector >=2.0,<2.3-dev -> satisfiable by symfony/symfony[2.0.7, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9], symfony/css-selector[2.0.4, 2.0.5, 2.0.6, 2.0.7, v2.0.10, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9].
- behat/mink v1.4.3 requires symfony/css-selector >=2.0,<2.4-dev -> satisfiable by symfony/symfony[2.0.7, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9, v2.3.0, v2.3.1, v2.3.2, v2.3.3, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8], symfony/css-selector[2.0.4, 2.0.5, 2.0.6, 2.0.7, v2.0.10, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9, v2.3.0, v2.3.1, v2.3.2, v2.3.3, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8].
- Can only install one of: symfony/symfony[v2.4.0, v2.3.0].
- Can only install one of: symfony/symfony[v2.4.0, v2.3.1].
- Can only install one of: symfony/symfony[v2.4.0, v2.3.2].
- Can only install one of: symfony/symfony[v2.4.0, v2.3.3].
- Can only install one of: symfony/symfony[v2.4.0, v2.3.4].
- Can only install one of: symfony/symfony[v2.4.0, v2.3.5].
- Can only install one of: symfony/symfony[v2.4.0, v2.3.6].
- Can only install one of: symfony/symfony[v2.4.0, v2.3.7].
- Can only install one of: symfony/symfony[v2.4.0, v2.3.8].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.0].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.1].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.10].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.11].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.2].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.3].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.4].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.5].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.6].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.7].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.8].
- Can only install one of: symfony/symfony[v2.4.0, v2.2.9].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.0].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.1].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.10].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.11].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.12].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.13].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.2].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.3].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.4].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.5].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.6].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.7].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.8].
- Can only install one of: symfony/symfony[v2.4.0, v2.1.9].
- Can only install one of: symfony/symfony[v2.4.0, 2.0.7].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.10].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.11].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.12].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.13].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.14].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.15].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.16].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.17].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.18].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.19].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.20].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.21].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.22].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.23].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.24].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.25].
- Can only install one of: symfony/symfony[v2.4.0, v2.0.9].
- don't install symfony/css-selector 2.0.4|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector 2.0.5|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector 2.0.6|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector 2.0.7|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.10|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.12|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.13|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.14|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.15|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.16|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.17|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.18|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.19|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.20|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.21|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.22|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.23|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.24|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.25|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.0.9|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.0|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.1|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.10|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.11|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.12|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.13|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.2|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.3|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.4|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.5|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.6|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.7|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.8|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.1.9|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.0|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.1|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.10|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.11|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.2|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.3|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.4|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.5|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.6|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.7|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.8|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.2.9|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.3.0|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.3.1|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.3.2|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.3.3|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.3.4|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.3.5|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.3.6|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.3.7|don't install symfony/symfony v2.4.0
- don't install symfony/css-selector v2.3.8|don't install symfony/symfony v2.4.0
- Installation request for symfony/symfony ~2.4 -> satisfiable by symfony/symfony[v2.4.0].
- Installation request for behat/mink 1.4.*@stable -> satisfiable by behat/mink[v1.4.0, v1.4.1, v1.4.2, v1.4.3].

我只是想安装这些组件,这样我就可以摆弄BDD 了

感谢您对的帮助

您需要使用符合最新版本symfony/css选择器的"behat/mink": "dev-master""behat/mink": "1.5"

啊,这又是Symfony 4.2的问题:

Problem 1
- behat/mink-extension 2.3.0 requires behat/mink ^1.5 -> satisfiable by behat/mink[v1.5.0, v1.6.0, v1.6.1, v1.7.0, v1.7.1].
- behat/mink-extension 2.3.1 requires behat/mink ^1.5 -> satisfiable by behat/mink[v1.5.0, v1.6.0, v1.6.1, v1.7.0, v1.7.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.
- behat/mink v1.6.1 requires symfony/css-selector ~2.0 -> no matching package found.
- behat/mink v1.6.0 requires symfony/css-selector ~2.0 -> no matching package found.
- behat/mink v1.5.0 requires symfony/css-selector ~2.0 -> no matching package found.
- Installation request for behat/mink-extension ^2.3 -> satisfiable by behat/mink-extension[2.3.0, 2.3.1].

解决方案是一样的,需要使用behat/mink:dev-master

例如:

$ composer require --dev behat/behat
$ composer require --dev behat/mink:dev-master
$ composer require --dev behat/mink-extension 
$ composer require --dev behat/mink-goutte-driver

这适用于symfony 2.4

"behat/behat": "2.5.*@stable",
"behat/symfony2-extension": "1.1.*@dev",
"behat/mink":   "1.5.*@stable",
"behat/mink-extension":          "*",
"behat/mink-browserkit-driver":  "*",
"behat/mink-selenium2-driver":   "*",
"behat/mink-goutte-driver": "*",
"behat/mink-sahi-driver": "*",
"phpunit/phpunit": "3.7.*"

相关内容

  • 没有找到相关文章

最新更新