Skip to content

Commit

Permalink
Remove MigrationsVersion class.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwage committed May 8, 2018
1 parent 12f4fc8 commit 7f091be
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 67 deletions.
4 changes: 4 additions & 0 deletions UPGRADE.md
Expand Up @@ -6,6 +6,10 @@ Your migration classes that previously used to extend `Doctrine\DBAL\Migrations\
`Doctrine\Migrations\AbstractMigration` instead. The `Doctrine\DBAL\Migrations\AbstractMigration` class will be
deprecated in the `1.7.1` release to prepare for the BC break.

## BC Break: Removed `Doctrine\DBAL\Migrations\MigrationsVersion`

The `Doctrine\DBAL\Migrations\MigrationsVersion` class is no longer available: please refrain from checking the Migrations version at runtime.

# Upgrade from 1.0-alpha1 to 1.0.0-alpha3

## AbstractMigration
Expand Down
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -13,6 +13,7 @@
"require": {
"php": "^7.1",
"doctrine/dbal": "^2.6",
"ocramius/package-versions": "^1.3",
"ocramius/proxy-manager": "^2.0.2",
"symfony/console": "^3.4||^4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions lib/Doctrine/Migrations/MigrationsVersion.php

This file was deleted.

4 changes: 2 additions & 2 deletions lib/Doctrine/Migrations/Tools/Console/ConsoleRunner.php
Expand Up @@ -4,7 +4,6 @@

namespace Doctrine\Migrations\Tools\Console;

use Doctrine\Migrations\MigrationsVersion;
use Doctrine\Migrations\Tools\Console\Command\AbstractCommand;
use Doctrine\Migrations\Tools\Console\Command\DiffCommand;
use Doctrine\Migrations\Tools\Console\Command\ExecuteCommand;
Expand All @@ -14,6 +13,7 @@
use Doctrine\Migrations\Tools\Console\Command\StatusCommand;
use Doctrine\Migrations\Tools\Console\Command\UpToDateCommand;
use Doctrine\Migrations\Tools\Console\Command\VersionCommand;
use PackageVersions\Versions;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Helper\HelperSet;

Expand All @@ -29,7 +29,7 @@ public static function run(HelperSet $helperSet, array $commands = []) : void
/** @param AbstractCommand[] $commands */
public static function createApplication(HelperSet $helperSet, array $commands = []) : Application
{
$cli = new Application('Doctrine Migrations', MigrationsVersion::VERSION());
$cli = new Application('Doctrine Migrations', Versions::getVersion('doctrine/migrations'));
$cli->setCatchExceptions(true);
$cli->setHelperSet($helperSet);
self::addCommands($cli);
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Migrations/Tests/Functional/CliTest.php
Expand Up @@ -8,7 +8,6 @@
use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\Migrations\Finder\RecursiveRegexFinder;
use Doctrine\Migrations\MigrationsVersion;
use Doctrine\Migrations\Provider\SchemaProviderInterface;
use Doctrine\Migrations\Provider\StubSchemaProvider;
use Doctrine\Migrations\Tests\Helper;
Expand All @@ -17,6 +16,7 @@
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;
use Doctrine\ORM\Tools\Setup as OrmSetup;
use PackageVersions\Versions;
use ReflectionClass;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
Expand Down Expand Up @@ -208,7 +208,7 @@ protected function setUp() : void
);

$this->conn = $this->getSqliteConnection();
$this->application = new Application('Doctrine Migrations Test', MigrationsVersion::VERSION());
$this->application = new Application('Doctrine Migrations Test', Versions::getVersion('doctrine/migrations'));
$this->application->setCatchExceptions(false);
$this->application->setAutoExit(false);
$this->application->getHelperSet()->set(
Expand Down
35 changes: 0 additions & 35 deletions tests/Doctrine/Migrations/Tests/Tools/MigrationsVersionTest.php

This file was deleted.

0 comments on commit 7f091be

Please sign in to comment.