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

查看:386
本文介绍了Symfony2 stop 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 中移除此行两次:

"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 stop Composer将parameters.yml.dist安装到parameters.yml中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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