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..85859e6b23 100644 --- a/lib/Doctrine/DBAL/Migrations/AbstractMigration.php +++ b/lib/Doctrine/DBAL/Migrations/AbstractMigration.php @@ -3,6 +3,7 @@ namespace Doctrine\DBAL\Migrations; use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration as BaseAbstractMigration; /** * Abstract class for individual migrations to extend from. @@ -11,6 +12,7 @@ * @link www.doctrine-project.org * @since 2.0 * @author Jonathan H. Wage + * @deprecated Please use Doctrine\Migrations\AbstractMigration */ abstract class AbstractMigration { @@ -51,6 +53,8 @@ abstract class AbstractMigration public function __construct(Version $version) { + @trigger_error(sprintf('The "%s" class is deprecated since Doctrine Migrations 2.0. Use %s instead.', AbstractMigration::class, BaseAbstractMigration::class), E_USER_DEPRECATED); + $config = $version->getConfiguration(); $this->version = $version; 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..4e20e94f75 --- /dev/null +++ b/lib/Doctrine/Migrations/AbstractMigration.php @@ -0,0 +1,20 @@ +getConfiguration(); + + $this->version = $version; + $this->connection = $config->getConnection(); + $this->sm = $this->connection->getSchemaManager(); + $this->platform = $this->connection->getDatabasePlatform(); + $this->outputWriter = $config->getOutputWriter(); + } +}