Skip to content

Commit

Permalink
Merge pull request #261 from Tobion/patch-1
Browse files Browse the repository at this point in the history
Fix dependency on a non-existent service "security.context"
  • Loading branch information
dbu committed Dec 9, 2015
2 parents dad3372 + 15cc7bb commit b75a42a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DependencyInjection/Compiler/SecurityContextPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
class SecurityContextPass implements CompilerPassInterface
{
const ROLE_PROVIDER_SERVICE = 'fos_http_cache.user_context.role_provider';

/**
* {@inheritdoc}
*/
Expand All @@ -31,8 +31,8 @@ public function process(ContainerBuilder $container)
if (!$container->has(self::ROLE_PROVIDER_SERVICE)) {
return;
}
if (!$container->has('security.token_storage')) {

if (!$container->has('security.token_storage') && $container->has('security.context')) {
$definition = $container->getDefinition(self::ROLE_PROVIDER_SERVICE);
$definition->replaceArgument(0, new Reference('security.context'));
}
Expand Down

0 comments on commit b75a42a

Please sign in to comment.