当运行`bin/behat`时,我得到一个“找不到类".错误 [英] When running `bin/behat` I get a "Class not found" error
问题描述
运行bin/behat
时出现此错误.
PHP致命错误:找不到类'Symfony \ Component \ Console \ Application' /vendor/behat/behat/src/Behat/Behat/Console/BehatApplication.php,第31行
PHP Fatal error: Class 'Symfony\Component\Console\Application' not found in /vendor/behat/behat/src/Behat/Behat/Console/BehatApplication.php on line 31
我的composer.json文件包含以下内容:
My composer.json file contains this:
{
要求":{
"drupal/drupal-extension":"",
"behat/behat":"2.4. @stable",
"behat/mink":"1.4@stable",
"behat/mink-goutte-driver":"",
"behat/mink-selenium-driver":"",
"behat/mink-selenium2-driver":"",
"behat/mink-sahi-driver":"",
"behat/mink-zombie-driver":"",
"behat/mink-extension":""
},
最小稳定度":"dev",
"config":{
"bin-dir":"bin/"
}
}
{
"require": {
"drupal/drupal-extension": "",
"behat/behat": "2.4.@stable",
"behat/mink": "1.4@stable",
"behat/mink-goutte-driver": "",
"behat/mink-selenium-driver": "",
"behat/mink-selenium2-driver": "",
"behat/mink-sahi-driver": "",
"behat/mink-zombie-driver": "",
"behat/mink-extension": ""
},
"minimum-stability": "dev",
"config": {
"bin-dir": "bin/"
}
}
由于某些原因,symfony/CssSelector无法克隆:
And for some reason symfony/CssSelector is failing to clone:
[RuntimeException]
无法通过git,https和http协议克隆,正在中止.
[RuntimeException]
Failed to clone via git, https and http protocols, aborting.
-
git://github.com/symfony/CssSelector.git
致命的:没有这样的远程作曲家"
git://github.com/symfony/CssSelector.git
fatal: No such remote 'composer'
https://github.com/symfony/CssSelector.git
致命的:没有这样的远程作曲家"
https://github.com/symfony/CssSelector.git
fatal: No such remote 'composer'
http://github.com/symfony/CssSelector.git
致命的:没有这样的远程作曲家"
http://github.com/symfony/CssSelector.git
fatal: No such remote 'composer'
推荐答案
我建议删除bin
,vendor
文件夹和composer.lock
文件并再次运行php composer.phar install
,然后安装软件包.
I suggest removing bin
, vendor
folders and composer.lock
file and running php composer.phar install
again, the packages should install fine then.
这篇关于当运行`bin/behat`时,我得到一个“找不到类".错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!