Skip to content

Commit

Permalink
Change the ConfigurationCheck against definition existence
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Culka committed Oct 16, 2017
1 parent 9f01602 commit 7d00d0c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions DependencyInjection/Compiler/ConfigurationCheckPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ public function process(ContainerBuilder $container)
}

if ($container->has('fos_rest.view_response_listener') && isset($container->getParameter('kernel.bundles')['SensioFrameworkExtraBundle'])) {
$config = $container->getExtensionConfig('sensio_framework_extra');
if (!(true === $config[0]['view']['annotations'] || $container->has('sensio_framework_extra.view.listener'))) {
if (!($container->has('sensio_framework_extra.view.listener') ^ $container->hasDefinition('Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener'))) {
throw new \RuntimeException('You must enable the SensioFrameworkExtraBundle view annotations to use the ViewResponseListener.');
}
}
Expand Down

0 comments on commit 7d00d0c

Please sign in to comment.