新的Symfony 3安装:无法打开输入文件:app / console在composer安装 [英] New Symfony 3 installation: Could not open input file: app/console in composer install

查看:1204
本文介绍了新的Symfony 3安装:无法打开输入文件:app / console在composer安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过官方symfony-installer安装了一个新的symfony3-instance( http://symfony.com/download )。做了第一件事情后,我将该项目提交给Git,并在另一天的计算机上克隆了它。
克隆后我运行composer install安装所有的symfony依赖。
现在出现的问题:脚本 ScriptHandler :: clearCache 停止并出现错误:无法打开输入文件:app / console
这是正确的 - symfony3有一个新的目录结构 - 所以控制台现在驻留在 / bin 不在 / app 中。
我如何告诉作曲家/项目使用新的结构而不是旧的结构?



我在这里读取(什么是新的Symfony 3目录结构?)关于console-command SENSIOLABS_ENABLE_NEW_DIRECTORY_STRUCTURE = true - 但在我的情况下不起作用。



任何提示?

ScriptHandler composer.json中的额外配置键中取出dir / code>文件名为 symfony-bin-dir 。因此,请检查作曲家是否包含正确的配置键,例如:



composer.json

  .... 
extra:{
symfony-app-dir:app,
symfony-bin -dir:bin,
symfony-var-dir:var,
....

编辑:



问题是与作曲家的缓存有关,所以它被解决清除它与命令: p>

 > php composer.phar clear-cache 

希望这个帮助


I installed a fresh symfony3-instance via the official symfony-installer (http://symfony.com/download). After doing the first things, I commited the project to Git and cloned it the other day on another computer. After the cloning I ran "composer install" to install all the symfony-dependencies. Now comes the problem: The script ScriptHandler::clearCache stops with an error: Could not open input file: app/console. Thats right - symfony3 has a new directory-structure - so the console resides now in /bin - not in /app. How can I tell composer/the project to use the new structure instead of the old one?

I read here (What is the new Symfony 3 directory structure?) about the console-command SENSIOLABS_ENABLE_NEW_DIRECTORY_STRUCTURE=true - but that doesn't work in my case.

Any tips?

解决方案

The ScriptHandler take the dir from the extra config key in the composer.json files names as symfony-bin-dir. So check that the composer contain the correct configuration key, as example:

composer.json

....
"extra": {
    "symfony-app-dir": "app",
    "symfony-bin-dir": "bin",
    "symfony-var-dir": "var",
    ....

EDIT:

The problem was related to che cache of composer, so it was solved clearing it with the command:

>php composer.phar clear-cache

Hope this help

这篇关于新的Symfony 3安装:无法打开输入文件:app / console在composer安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆