From 3eddc370952859bf0c2beb3e8a071b319266c199 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Fri, 18 May 2018 18:33:30 +0100 Subject: [PATCH] Introduce Doctrine\DBAL\Migrations\AbstractMigration deprecation. --- composer.json | 5 +++-- lib/Doctrine/DBAL/Migrations/AbstractMigration.php | 9 +++++++++ .../Migrations/Tools/Console/Command/GenerateCommand.php | 2 +- lib/Doctrine/Migrations/AbstractMigration.php | 9 +++++++++ 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 lib/Doctrine/Migrations/AbstractMigration.php diff --git a/composer.json b/composer.json index 149c5b5905..3217b5ca3c 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,8 @@ }, "autoload": { "psr-4": { - "Doctrine\\DBAL\\Migrations\\": "lib/Doctrine/DBAL/Migrations" + "Doctrine\\DBAL\\Migrations\\": "lib/Doctrine/DBAL/Migrations", + "Doctrine\\Migrations\\": "lib/Doctrine/Migrations" } }, "autoload-dev": { @@ -41,7 +42,7 @@ }, "extra": { "branch-alias": { - "dev-master": "v1.7.x-dev" + "dev-master": "v1.8.x-dev" } }, "bin": [ diff --git a/lib/Doctrine/DBAL/Migrations/AbstractMigration.php b/lib/Doctrine/DBAL/Migrations/AbstractMigration.php index d689bcd8a0..47814c4cb2 100644 --- a/lib/Doctrine/DBAL/Migrations/AbstractMigration.php +++ b/lib/Doctrine/DBAL/Migrations/AbstractMigration.php @@ -2,7 +2,15 @@ namespace Doctrine\DBAL\Migrations; +use Doctrine\DBAL\Migrations\AbortMigrationException; +use Doctrine\DBAL\Migrations\IrreversibleMigrationException; +use Doctrine\DBAL\Migrations\OutputWriter; +use Doctrine\DBAL\Migrations\SkipMigrationException; +use Doctrine\DBAL\Migrations\Version; use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration as BaseAbstractMigration; + +@trigger_error(sprintf('The "%s" class is deprecated since Doctrine Migrations 2.0. Use %s instead.', AbstractMigration::class, BaseAbstractMigration::class), E_USER_DEPRECATED); /** * Abstract class for individual migrations to extend from. @@ -11,6 +19,7 @@ * @link www.doctrine-project.org * @since 2.0 * @author Jonathan H. Wage + * @deprecated Please use Doctrine\Migrations\AbstractMigration */ abstract class AbstractMigration { diff --git a/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/GenerateCommand.php b/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/GenerateCommand.php index e1d631dbdf..578ab177b7 100644 --- a/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/GenerateCommand.php +++ b/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/GenerateCommand.php @@ -24,8 +24,8 @@ class GenerateCommand extends AbstractCommand namespace ; -use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; /** * Auto-generated Migration: Please modify to your needs! diff --git a/lib/Doctrine/Migrations/AbstractMigration.php b/lib/Doctrine/Migrations/AbstractMigration.php new file mode 100644 index 0000000000..b69a76f89c --- /dev/null +++ b/lib/Doctrine/Migrations/AbstractMigration.php @@ -0,0 +1,9 @@ +