Doctrine migrations 2.0 introduced a number of BC breaks forcing users migrating from 1.x to adjust all of their previous migrations. This package aims to automate upgrading from 1.x to 2.0 by doing automatic code adjustments for your migration files.
The following bc breaks are covered:
- exception class renames
- main namespace rename
- migration classes return type signature fix (for
up()
,down()
,preUp()
,postUp()
,preDown()
,postDown()
,getDescription()
,isTransactional()
)
composer require --dev sserbin/doctrine-migrations2-upgrade
# or globally
composer global require sserbin/doctrine-migrations2-upgrade
vendor/bin/migrations-upgrade path/to/migrations --dry-run
# or if installed globally (assuming global composer is in $PATH)
migrations-upgrade path/to/migrations --dry-run