Skip to content

Commit

Permalink
Merge pull request #12 from A5sys/empty-schema-provider
Browse files Browse the repository at this point in the history
Creates an EmptySchemaProvider dependency for DiffGenerator
  • Loading branch information
jonag authored Nov 2, 2020
2 parents 3ab7b16 + 59ababe commit b2afd54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Command/DiffFileCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Doctrine\DBAL\Types\Type;
use Doctrine\Migrations\Generator\DiffGenerator;
use Doctrine\Migrations\Generator\Exception\NoChangesDetected;
use Doctrine\Migrations\Provider\EmptySchemaProvider;
use Doctrine\Migrations\Provider\SchemaProviderInterface;
use Doctrine\Migrations\Tools\Console\Helper\MigrationDirectoryHelper;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -82,7 +83,8 @@ protected function createMigrationDiffGenerator() : DiffGenerator
$this->getSchemaProvider(),
$this->connection->getDatabasePlatform(),
$this->dependencyFactory->getMigrationGenerator(),
$this->dependencyFactory->getMigrationSqlGenerator()
$this->dependencyFactory->getMigrationSqlGenerator(),
new EmptySchemaProvider($this->schemaManager)
);
}

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"require": {
"php": ">=7.1",
"symfony/framework-bundle": "~3.4|~4.0|~5.0",
"doctrine/doctrine-migrations-bundle": "~2.0"
"doctrine/doctrine-migrations-bundle": "^2.0",
"doctrine/migrations": "^2.3"
}
}

0 comments on commit b2afd54

Please sign in to comment.