src/Knp/DictionaryBundle/DependencyInjection/Compiler/DictionaryTracePass.php
public function process(ContainerBuilder $container): void
    {
        if (false === $container->has(DictionaryDataCollector::class)) {
            return;
        }

        foreach ($container->findTaggedServiceIds(DictionaryRegistrationPass::TAG_DICTIONARY) as $id => $tags) {
            $serviceId  = sprintf('%s.%s.traceable', $id, md5($id));
            $dictionary = new Reference(sprintf('%s.inner', $serviceId));
            $traceable  = new Definition(Traceable::class, [$dictionary, new Reference(DictionaryDataCollector::class)]);

            $traceable->setDecoratedService($id);

            $container->setDefinition($serviceId, $traceable);
        }
    }
public function process(ContainerBuilder $container): void
    {
        if (false === $container->has(DictionaryDataCollector::class)) {
            return;
        }

        foreach ($container->findTaggedServiceIds(DictionaryRegistrationPass::TAG_DICTIONARY) as $id => $tags) {
            $serviceId  = sprintf('%s.%s.traceable', $id, md5($id));
            $dictionary = new Reference(sprintf('%s.inner', $serviceId));
            $traceable  = new Definition(Traceable::class, [$dictionary, new Reference(DictionaryDataCollector::class)]);

            $traceable->setDecoratedService($id);

            $container->setDefinition($serviceId, $traceable);
        }
    }
{@inheritdoc}