has(ContextPropertiesLocator::class)) { return; } $definition = $container->findDefinition(ContextPropertiesLocator::class); // find all service IDs with the kupshop.feed.expression.functions tag $taggedServices = $container->findTaggedServiceIds('kupshop.feed.context.property'); foreach ($taggedServices as $id => $tags) { $class = $container->findDefinition($id)->getClass(); $definition->addMethodCall('addContextProperty', [ $id, $class::getName(), ]); } $definition->addMethodCall('sortContexts'); } }