migrations
migrations copied to clipboard
Add support for custom stubs for generate migrations
Command doctrine:migrations:generate uses 'stubs' files as templates for generate migration classes. It would be nice to have support for create custom stubs.
We need to add the same custom postUp() and postDown() methods to every generated migration. Now we have to add these methods manually and custom stub file is exactly the solution we need for adding these two methods to migration classes automatically.
How to implement:
Add new configuration option like stubs_path which can be pointed to directory with custom stubs files (blank.stub, create.stub, update.stub). In case the custom stub file doesn't exists the default one will be used.