We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dad3372 + 15cc7bb commit b75a42aCopy full SHA for b75a42a
DependencyInjection/Compiler/SecurityContextPass.php
@@ -22,7 +22,7 @@
22
class SecurityContextPass implements CompilerPassInterface
23
{
24
const ROLE_PROVIDER_SERVICE = 'fos_http_cache.user_context.role_provider';
25
-
+
26
/**
27
* {@inheritdoc}
28
*/
@@ -31,8 +31,8 @@ public function process(ContainerBuilder $container)
31
if (!$container->has(self::ROLE_PROVIDER_SERVICE)) {
32
return;
33
}
34
35
- if (!$container->has('security.token_storage')) {
+ if (!$container->has('security.token_storage') && $container->has('security.context')) {
36
$definition = $container->getDefinition(self::ROLE_PROVIDER_SERVICE);
37
$definition->replaceArgument(0, new Reference('security.context'));
38
0 commit comments