项目作者: sserbin

项目描述 :
Automatically adjust your old migrations when upgrading to doctrine/migrations:2.0
高级语言: PHP
项目地址: git://github.com/sserbin/doctrine-migrations2-upgrade.git
创建时间: 2019-02-01T09:22:23Z
项目社区:https://github.com/sserbin/doctrine-migrations2-upgrade

开源协议:MIT License

下载


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

  1. composer require --dev sserbin/doctrine-migrations2-upgrade
  2. # or globally
  3. composer global require sserbin/doctrine-migrations2-upgrade

Usage

  1. vendor/bin/migrations-upgrade path/to/migrations --dry-run
  2. # or if installed globally (assuming global composer is in $PATH)
  3. migrations-upgrade path/to/migrations --dry-run