Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Composer php 编写器:无法在laravel 5.2新项目中安装behat和mink_Composer Php_Behat_Mink_Laravel 5.2 - Fatal编程技术网

Composer php 编写器:无法在laravel 5.2新项目中安装behat和mink

Composer php 编写器:无法在laravel 5.2新项目中安装behat和mink,composer-php,behat,mink,laravel-5.2,Composer Php,Behat,Mink,Laravel 5.2,我想在laravel项目中学习使用behat的BDD,但我遇到了与composer的交叉依赖性问题(这可能是一个非常基本的问题,但我在composer方面的经验很少,所以我不知道该怎么做) 我创建了一个新项目 composer创建项目laravel/laravel学习行为 然后我想得到behat、mink和mink扩展: composer需要behat/behat-behat/mink-behat/mink扩展--dev 但它失败了,我得到了这个输出: Using version ^3.0 fo

我想在laravel项目中学习使用behat的BDD,但我遇到了与composer的交叉依赖性问题(这可能是一个非常基本的问题,但我在composer方面的经验很少,所以我不知道该怎么做)

我创建了一个新项目

composer创建项目laravel/laravel学习行为

然后我想得到behat、mink和mink扩展:

composer需要behat/behat-behat/mink-behat/mink扩展--dev

但它失败了,我得到了这个输出:

Using version ^3.0 for behat/behat
Using version ^1.7 for behat/mink
Using version ^2.1 for behat/mink-extension
./composer.json has been updated
> php artisan clear-compiled
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
    - Installation request for behat/mink ^1.7 -> satisfiable by behat/mink[v1.7.0].
    - Conclusion: remove symfony/css-selector v3.0.1
    - Conclusion: don't install symfony/css-selector v3.0.1
    - behat/mink v1.7.0 requires symfony/css-selector ~2.1 -> satisfiable by symfony/css-selector[v2.8.0, v2.8.1].
    - Can only install one of: symfony/css-selector[v2.8.0, v3.0.1].
    - Can only install one of: symfony/css-selector[v2.8.1, v3.0.1].
    - Installation request for symfony/css-selector == 3.0.1.0 -> satisfiable by symfony/css-selector[v3.0.1].


Installation failed, reverting ./composer.json to its original content.
当我仅尝试安装behat(
composer require behat/behat--dev
)时,也会出现以下错误:

Using version ^3.0 for behat/behat
./composer.json has been updated
> php artisan clear-compiled
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 behat/behat v3.0.15
    - Conclusion: don't install behat/behat v3.0.14
    - Conclusion: don't install behat/behat v3.0.13
    - Conclusion: don't install behat/behat v3.0.12
    - Conclusion: don't install behat/behat v3.0.11
    - Conclusion: don't install behat/behat v3.0.10
    - Conclusion: don't install behat/behat v3.0.9
    - Conclusion: don't install behat/behat v3.0.8
    - Conclusion: don't install behat/behat v3.0.7
    - Conclusion: don't install behat/behat v3.0.6
    - Conclusion: don't install behat/behat v3.0.5
    - Conclusion: don't install behat/behat v3.0.4
    - Conclusion: don't install behat/behat v3.0.3
    - Conclusion: don't install behat/behat v3.0.2
    - Conclusion: don't install behat/behat v3.0.1
    - Conclusion: remove symfony/translation v3.0.1
    - Installation request for behat/behat ^3.0 -> satisfiable by behat/behat[v3.0.0, v3.0.1, v3.0.10, v3.0.11, v3.0.12, v3.0.13, v3.0.14, v3.0.15, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9].
    - Conclusion: don't install symfony/translation v3.0.1
    - behat/behat v3.0.0 requires symfony/translation ~2.1 -> satisfiable by symfony/translation[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.10, v2.3.11, v2.3.12, v2.3.13, v2.3.14, v2.3.15, v2.3.16, v2.3.17, v2.3.18, v2.3.19, v2.3.2, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24, v2.3.25, v2.3.26, v2.3.27, v2.3.28, v2.3.29, v2.3.3, v2.3.30, v2.3.31, v2.3.32, v2.3.33, v2.3.34, v2.3.35, v2.3.36, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8, v2.3.9, v2.4.0, v2.4.1, v2.4.10, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9, v2.5.0, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.8.0, v2.8.1].
    - Can only install one of: symfony/translation[v2.6.0, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.1, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.10, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.11, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.12, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.2, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.3, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.4, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.5, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.6, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.7, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.8, v3.0.1].
    - Can only install one of: symfony/translation[v2.6.9, v3.0.1].
    - Can only install one of: symfony/translation[v2.7.0, v3.0.1].
    - Can only install one of: symfony/translation[v2.7.1, v3.0.1].
    - Can only install one of: symfony/translation[v2.7.2, v3.0.1].
    - Can only install one of: symfony/translation[v2.7.3, v3.0.1].
    - Can only install one of: symfony/translation[v2.7.4, v3.0.1].
    - Can only install one of: symfony/translation[v2.7.5, v3.0.1].
    - Can only install one of: symfony/translation[v2.7.6, v3.0.1].
    - Can only install one of: symfony/translation[v2.7.7, v3.0.1].
    - Can only install one of: symfony/translation[v2.7.8, v3.0.1].
    - Can only install one of: symfony/translation[v2.8.0, v3.0.1].
    - Can only install one of: symfony/translation[v2.8.1, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.0, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.1, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.10, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.11, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.12, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.13, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.2, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.3, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.4, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.5, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.6, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.7, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.8, v3.0.1].
    - Can only install one of: symfony/translation[v2.1.9, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.0, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.1, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.10, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.11, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.2, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.3, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.4, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.5, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.6, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.7, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.8, v3.0.1].
    - Can only install one of: symfony/translation[v2.2.9, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.0, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.1, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.10, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.11, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.12, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.13, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.14, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.15, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.16, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.17, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.18, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.19, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.2, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.20, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.21, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.22, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.23, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.24, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.25, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.26, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.27, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.28, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.29, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.3, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.30, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.31, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.32, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.33, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.34, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.35, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.36, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.4, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.5, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.6, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.7, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.8, v3.0.1].
    - Can only install one of: symfony/translation[v2.3.9, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.0, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.1, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.10, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.2, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.3, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.4, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.5, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.6, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.7, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.8, v3.0.1].
    - Can only install one of: symfony/translation[v2.4.9, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.0, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.1, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.10, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.11, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.12, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.2, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.3, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.4, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.5, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.6, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.7, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.8, v3.0.1].
    - Can only install one of: symfony/translation[v2.5.9, v3.0.1].
    - Installation request for symfony/translation == 3.0.1.0 -> satisfiable by symfony/translation[v3.0.1].


Installation failed, reverting ./composer.json to its original content.

多亏了你,我找到了一个有效的解决方案

安装
dev master
版本的
behat
mink
mink扩展
对我很有效。因此,与其

composer需要behat/behat-behat/mink-behat/mink扩展--dev

您需要执行以下操作:


composer需要behat/behat:dev-master-behat/mink:dev-master-behat/mink-extension:dev-master-dev-master-dev
如果您需要安装behat-Laravel-extension
laracasts/behat-Laravel-extension
,则会出现以下错误:

Problem 1
- Installation request for laracasts/behat-laravel-extension ^1.0 -> satisfiable by laracasts/behat-laravel-extension[1.0].
- Conclusion: remove symfony/dom-crawler v3.0.1
- Conclusion: don't install symfony/dom-crawler v3.0.1
- laracasts/behat-laravel-extension 1.0 requires behat/mink-browserkit-driver ~1.2 -> satisfiable by behat/mink-browserkit-driver[v1.2.0, v1.3.0].
- behat/mink-browserkit-driver v1.2.0 requires symfony/dom-crawler ~2.0 -> satisfiable by symfony/dom-crawler[v2.8.0, v2.8.1, v2.8.2].
- behat/mink-browserkit-driver v1.3.0 requires symfony/dom-crawler ~2.3 -> satisfiable by symfony/dom-crawler[v2.8.0, v2.8.1, v2.8.2].
- Can only install one of: symfony/dom-crawler[v2.8.0, v3.0.1].
- Can only install one of: symfony/dom-crawler[v2.8.1, v3.0.1].
- Can only install one of: symfony/dom-crawler[v2.8.2, v3.0.1].
- Installation request for symfony/dom-crawler == 3.0.1.0 -> satisfiable by symfony/dom-crawler[v3.0.1].
是一个讨论和解决问题的过程:

添加到composer.json的下一行:

"require-dev": {
    "laracasts/behat-laravel-extension": "~1.1"
},
"repositories": [
    {
        "type": "vcs",
        "url": "https://www.github.com/ikari7789/behat-laravel-extension.git"
    },
    {
        "type": "vcs",
        "url": "https://www.github.com/ikari7789/minkbrowserkitdriver.git"
    }
],

通过执行update命令完成:
composer update

我已经设法解决了这个问题:首先运行这个 编写器要求--dev symfony/css选择器:~2.7 然后 编写器需要behat/behat:dev master behat/mink:dev master behat/mink扩展:dev master--dev编写器需要behat/behat-behat/mink-behat/mink扩展--dev