Skip to content

Automatically adjust your old migrations when upgrading to doctrine/migrations:2.0

License

Notifications You must be signed in to change notification settings

sserbin/doctrine-migrations2-upgrade

Repository files navigation

Build Status Scrutinizer Code Quality Code Coverage

Intro

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())

Installation

composer require --dev sserbin/doctrine-migrations2-upgrade
# or globally
composer global require sserbin/doctrine-migrations2-upgrade

Usage

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

About

Automatically adjust your old migrations when upgrading to doctrine/migrations:2.0

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published