From 984f3c56f0ec5e803584ef57dccd3a5f85967013 Mon Sep 17 00:00:00 2001 From: Nicolo Singer Date: Tue, 27 May 2025 15:56:25 -0500 Subject: [PATCH] fix: use doctrine migration factory --- src/DependencyInjection/PatchlevelEventSourcingExtension.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/DependencyInjection/PatchlevelEventSourcingExtension.php b/src/DependencyInjection/PatchlevelEventSourcingExtension.php index 06677b6b..00845d81 100644 --- a/src/DependencyInjection/PatchlevelEventSourcingExtension.php +++ b/src/DependencyInjection/PatchlevelEventSourcingExtension.php @@ -16,6 +16,7 @@ use Doctrine\Migrations\Tools\Console\Command\ExecuteCommand; use Doctrine\Migrations\Tools\Console\Command\MigrateCommand; use Doctrine\Migrations\Tools\Console\Command\StatusCommand; +use Doctrine\Migrations\Version\MigrationFactory; use Doctrine\ORM\Tools\ToolEvents; use Patchlevel\EventSourcing\Attribute\Aggregate; use Patchlevel\EventSourcing\Attribute\Event; @@ -996,6 +997,10 @@ private function configureMigration(array $config, ContainerBuilder $container): ->addMethodCall('setService', [ SchemaProvider::class, new Reference(DoctrineMigrationSchemaProvider::class), + ]) + ->addMethodCall('setService', [ + MigrationFactory::class, + new Reference('doctrine.migrations.migrations_factory'), ]); $container->register('event_sourcing.command.migration_diff', DiffCommand::class)