我无法运行,composer install
因为它在执行post-install-cmd
-scripts 时失败了.
原因是Symfony 3将控制台应用程序从app文件夹移动到bin文件夹.
我曾尝试composer clear-cache
和composer self-update
,所以我可以确认我运行的是最新版本的作曲家,没有任何运气...谁能帮助我?
结果来自 composer diagnose
composer diagnose Checking composer.json: FAIL Defining autoload.psr-4 with an empty namespace prefix is a bad idea for performance require.symfony/symfony : unbound version constraints (dev-master) should be avoided Checking platform settings: OK Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: OK Checking github.com rate limit: OK Checking disk free space: OK Checking composer version: OK
编辑:添加了我的composer.json文件:Pastie
额外的部分:
"extra": { "symfony-app-dir": "app", "symfony-bin-dir": "bin", "symfony-var-dir": "var", "symfony-web-dir": "web", "symfony-tests-dir": "tests", "symfony-assets-install": "relative", "incenteev-parameters": { "file": "app/config/parameters.yml" } }
Composer出错:
Could not open input file: app/console Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception [RuntimeException] An error occurred when executing the "'cache:clear --no-warmup'" command: Could not open input file: app/console .
Manuall测试bin/composer cache:clear
:
bin/console cache:clear // Clearing the cache for the dev environment with debug true [OK] Cache for the "dev" environment (debug=true) was successfully cleared.
问题回复:https://bitbucket.org/Richardh87/messenger
有同样的问题.发现var
目录丢失了.
将var
目录添加到项目根目录为我解决了这个问题.看起来symfony 3尝试使用旧的项目结构,如果缺少var文件夹.希望这可以帮助别人.
尝试
sudo rm -rf vendor/* sudo rm -rf composer.lock
然后运行
composer install
再次