Skip to content

Commit

Permalink
Fix Doctrine/Migrations configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 committed Nov 13, 2020
1 parent 1489900 commit fe0deaa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/DependencyInjection/SyliusRefundExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ public function prepend(ContainerBuilder $container): void
return;
}

$doctrineConfig = $container->getExtensionConfig('doctrine_migrations');
$migrationsPath = (array) \array_pop($doctrineConfig)['migrations_paths'];
$container->prependExtensionConfig('doctrine_migrations', [
'migrations_paths' => [
'Sylius\RefundPlugin\Migrations' => __DIR__ . '/../Migrations',
],
'migrations_paths' => \array_merge(
$migrationsPath ?? [],
[
'Sylius\RefundPlugin\Migrations' => '@SyliusRefundPlugin/Migrations',
]
),
]);

$container->prependExtensionConfig('sylius_labs_doctrine_migrations_extra', [
Expand Down
2 changes: 2 additions & 0 deletions tests/Application/config/packages/doctrine_migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ doctrine_migrations:
storage:
table_storage:
table_name: sylius_migrations
migrations_paths:
'App\Migrations': '%kernel.project_dir%/src/Migrations/'

0 comments on commit fe0deaa

Please sign in to comment.