2014-06-15 84 views
0

當我嘗試安裝Behat + Mink +硒時,出現以下錯誤。什麼可能是解決方案?Behat + Mink + Selenium安裝

PHP composer.phar安裝

Loading composer repositories with package information 
Installing dependencies (including require-dev) from lock file 
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. 
Your requirements could not be resolved to an installable set of packages. 

    Problem 1 
    - Installation request for symfony/framework-standard-edition 2.4.x-dev -> satisfiable by symfony/framework-standard-edition[2.4.x-dev]. 
    - symfony/framework-standard-edition 2.4.x-dev requires behat/behat 2.4.*@stable -> no matching package found. 

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://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details. 

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems. 

Composer.json:

{ 
    "name": "symfony/framework-standard-edition", 
    "license": "MIT", 
    "type": "project", 
    "description": "The \"Symfony Standard Edition\" distribution", 
    "minimum-stability": "dev", 
    "autoload": { 
     "psr-0": { "": "src/" } 
    }, 
    "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/mink-extension": "*", 
     "behat/mink-goutte-driver": "*", 
     "behat/mink-selenium2-driver": "*", 
     "behat/symfony2-extension": "*", 
     "behat/mink-browserkit-driver": "*", 
     "behat/mink-sahi-driver": "*", 
     "phpunit/phpunit": "3.7.*" 
    }, 
    "scripts": { 
     "post-install-cmd": [ 
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 
     ], 
     "post-update-cmd": [ 
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 
     ] 
    }, 
    "config": { 
     "bin-dir": "bin/" 
    }, 
    "extra": { 
     "symfony-app-dir": "app", 
     "symfony-web-dir": "web", 
     "incenteev-parameters": { 
      "file": "app/config/parameters.yml" 
     }, 
     "branch-alias": { 
      "dev-master": "2.4-dev" 
     } 
    } 
} 

我下面的這兩個博客進行安裝:

回答

2

IMO,你已經註冊了太多的軟件包。例如,behat是symfony2擴展的依賴。所以,只需要symfony2-extension和behat就可以了:)當你明確需要所有東西的時候,你需要檢查每個軟件包約束是否可以在packagist上一起工作(這可能會變得很痛苦)...

對於Symfony的2.4項目,我會用以下包:

"require-dev": { 
    "behat/symfony2-extension": "~1.1", 
    "behat/mink-extension": "~1.3", 
    "behat/mink-selenium2-driver": "~1.1", 
    "behat/mink-goutte-driver": "~1.0", 
} 
+0

如何知道要使用的版本號? – zkent

0

我建議運行作曲家要求,並在安裝做一個作曲家更新之前,使所有的依賴都在更新版本。所以下面的依賴對於我的symfony2.8項目是有用的:

composer update 
composer require behat/behat 
composer require behat/symfony2-extension 
composer require behat/mink 
composer require behat/mink-browserkit-driver 
composer require behat/mink-extension 
composer require behat/mink-goutte-driver 
composer require behat/mink-selenium2-driver 
composer require emuse/behat-html-formatter 
composer require coduo/php-matcher 
相關問題