Symfony2 stop Composer installing parameters.yml.dist into parameters.yml

Andrew Atkinson picture Andrew Atkinson · Jul 3, 2013 · Viewed 28.8k times · Source

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?

Answer

Wouter J picture Wouter J · Jul 3, 2013

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