Reputation: 559
In my symfony project i would like to trigger the
php app/console doctrine:migration:migrate
on every
composer install --no-dev
I have read that it should be possible to place such a command in the post-install-cmd
Section of my composer file but can not figure out how to use it properly.
Upvotes: 1
Views: 1224
Reputation: 41934
You have to create a Composer Script:
A script, in Composer's terms, can either be a PHP callback (defined as a static method) or any command-line executable command.
Just like they do in the example:
{
"scripts": {
"post-install-cmd": ["phpunit -c app/"],
}
}
Upvotes: 2