I work on the application where the security.context service doesn't exist because there is no Symfony authorization in the app.
When enable_collector is true the app doesn't work because of unsatisfied security.context dependency for the liuggio_stats_d_client.collector.user service.
StatsDClientBundle shouldn't require security.context service when the user collector is not used.
For now I use the following workaround:
class MyBundle extends Bundle
{
/**
* {@inheritDoc}
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new StatsdUserCollectorCompilerPass());
}
}
class StatsdUserCollectorCompilerPass implements CompilerPassInterface
{
/**
* {@inheritDoc}
*/
public function process(ContainerBuilder $container)
{
$definition = $container->getDefinition('liuggio_stats_d_client.collector.user');
$definition->removeMethodCall('setSecurityContext');
}
}
I work on the application where the
security.context
service doesn't exist because there is no Symfony authorization in the app.When
enable_collector
istrue
the app doesn't work because of unsatisfiedsecurity.context
dependency for theliuggio_stats_d_client.collector.user
service.StatsDClientBundle
shouldn't requiresecurity.context
service when theuser
collector is not used.For now I use the following workaround: