Symfony2 停止 Composer 将 parameters.yml.dist 安装到 parameters.yml [英] Symfony2 stop Composer installing parameters.yml.dist into parameters.yml

查看:30
本文介绍了Symfony2 停止 Composer 将 parameters.yml.dist 安装到 parameters.yml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

symfony 2.3 中的新功能 composer install 脚本还将 parameters.yml.dist 文件内容复制到 parameters.yml 文件中,解释进一步这里.

New in symfony 2.3 the composer install script also copies the parameters.yml.dist file contents into the parameters.yml file, explained further here.

我的问题是,如何阻止作曲家执行此操作?

My question is, how can I stop composer preforming this action?

推荐答案

从您的 composer.json 中两次删除此行:

Remove this line twice from your composer.json:

"Incenteev\ParameterHandler\ScriptHandler::buildParameters",

这是由 IncenteevParameterHandler 库完成的,其中包含执行此操作的脚本.通过从配置中删除脚本,它将永远不会被调用.

This is done by the IncenteevParameterHandler library, which contains a script that does this. By removing the script from the config, it will never be called.

如果您永远删除该行,您也可以删除这些行(因为不再需要该库):

If you remove that line for ever, you can also remove these lines (as the library isn't really needed anymore):

"incenteev/composer-parameter-handler": "~2.0",

...

"incenteev-parameters": {
    "file": "app/config/parameters.yml"
},

这篇关于Symfony2 停止 Composer 将 parameters.yml.dist 安装到 parameters.yml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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