Struggling to install mink and behat using composer for use with symfony2

给你一囗甜甜゛ 提交于 2019-12-04 05:25:12

You need to use "behat/mink": "dev-master" or "behat/mink": "1.5" which is compliant with the lastest version of symfony/css-selector.

this works for 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.*"

Ah, this is again the problem for 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].

And the solution is the same, one needs to use behat/mink:dev-master.

For example:

$ 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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!