getDefinition('doctrine.fixtures.loader'); $taggedServices = $container->findTaggedServiceIds(self::FIXTURE_TAG); $fixtures = []; foreach ($taggedServices as $serviceId => $tags) { $groups = []; foreach ($tags as $tagData) { if (! isset($tagData['group'])) { continue; } $groups[] = $tagData['group']; } $fixtures[] = [ 'fixture' => new Reference($serviceId), 'groups' => $groups, ]; } $definition->addMethodCall('addFixtures', [$fixtures]); } }