44
55use ArrayObject ;
66use Doctrine \DBAL \Connection ;
7- use Doctrine \DBAL \Platforms \PostgreSQLPlatform ;
87use Doctrine \Migrations \Tools \Console \Command \CurrentCommand ;
98use Doctrine \Migrations \Tools \Console \Command \DiffCommand ;
109use Doctrine \Migrations \Tools \Console \Command \ExecuteCommand ;
@@ -378,6 +377,7 @@ public function testMigrateStore(): void
378377 $ container = new ContainerBuilder ();
379378
380379 $ container ->register ('my_translator ' , ExcludeEventWithHeaderTranslator::class)
380+ ->setPublic (true )
381381 ->setArguments ([ArchivedHeader::class]);
382382
383383 $ this ->compileContainer (
@@ -1629,10 +1629,6 @@ private function compileContainer(ContainerBuilder $container, array $config): v
16291629 $ container ->setParameter ('kernel.project_dir ' , __DIR__ );
16301630
16311631 $ connection = $ this ->createMock (Connection::class);
1632- $ connection
1633- ->expects ($ this ->never ())
1634- ->method ('getDatabasePlatform ' )
1635- ->willReturn (new PostgreSQLPlatform ());
16361632
16371633 $ container ->set ('doctrine.dbal.eventstore_connection ' , $ connection );
16381634 $ container ->set ('event.bus ' , $ this ->createMock (MessageBusInterface::class));
@@ -1648,10 +1644,19 @@ private function compileContainer(ContainerBuilder $container, array $config): v
16481644
16491645 $ compilerPassConfig = $ container ->getCompilerPassConfig ();
16501646 $ compilerPassConfig ->setRemovingPasses ([]);
1651- $ compilerPassConfig ->addPass (new TestCaseAllPublicCompilerPass ());
1647+ $ compilerPassConfig ->addPass (new AllPublicCompilerPass ());
1648+ $ compilerPassConfig ->addPass (new NoLazyCompilerPass ());
16521649
16531650 $ container ->compile ();
16541651
1652+ foreach ($ container ->getServiceIds () as $ id ) {
1653+ if (str_ends_with ($ id , '.inner ' )) {
1654+ continue ;
1655+ }
1656+
1657+ $ container ->get ($ id );
1658+ }
1659+
16551660 (new XmlDumper ($ container ))->dump ();
16561661 }
16571662}
0 commit comments