New Symfony 3 installation: Could not open input file: app/console in composer install(新的 Symfony 3 安装:无法打开输入文件:作曲家安装中的 app/console)
问题描述
我通过官方 symfony-installer (http://symfony.com/download).完成第一件事后,我将项目提交给 Git,并在前几天将其克隆到另一台计算机上.克隆后我运行composer install"来安装所有的 symfony 依赖项.现在问题来了:脚本 ScriptHandler::clearCache 停止并出现错误:Could not open input file: app/console.没错——symfony3 有一个新的目录结构——所以console 现在驻留在/bin 中——而不是/app.如何告诉作曲家/项目使用新结构而不是旧结构?
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?
我在这里阅读(什么是新的 Symfony 3 目录结构?) 关于控制台命令 SENSIOLABS_ENABLE_NEW_DIRECTORY_STRUCTURE=true - 但这在我的情况下不起作用.
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.
有什么建议吗?
推荐答案
ScriptHandler 从 composer.json 文件名中的额外配置键中获取目录为 <代码>symfony-bin-dir.所以检查作曲家是否包含正确的配置密钥,例如:
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",
....
问题与作曲家的缓存有关.使用命令清除它已解决:
The problem was related to the cache of composer. It was solved clearing it with the command:
>php composer.phar clear-cache
希望这会有所帮助.
这篇关于新的 Symfony 3 安装:无法打开输入文件:作曲家安装中的 app/console的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:新的 Symfony 3 安装:无法打开输入文件:作曲家安装中的 app/console
基础教程推荐
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何替换eregi() 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
