registerForAutoconfiguration(SluggerType::class)->addTag('tx_events.slugger_type'); $containerBuilder->addCompilerPass(new class() implements CompilerPassInterface { public function process(ContainerBuilder $container): void { $registry = $container->getDefinition(Registry::class); foreach (array_keys($container->findTaggedServiceIds('tx_events.slugger_type')) as $serviceId) { $registry->addMethodCall('add', [$container->getDefinition($serviceId)]); } } }); };