Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
660 views
in Technique[技术] by (71.8m points)

symfony - Symfony2 stop Composer installing parameters.yml.dist into 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Remove this line twice from your composer.json:

"Incenteev\ParameterHandler\ScriptHandler::buildParameters",

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"
},

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...