You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DependencyInjection/Compiler/TwigExceptionPass.php
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,14 @@ final class TwigExceptionPass implements CompilerPassInterface
24
24
{
25
25
publicfunctionprocess(ContainerBuilder$container)
26
26
{
27
+
if ($container->hasDefinition('fos_rest.exception.codes_map') // is config exception.enabled true
28
+
&& $container->hasParameter('twig.exception_listener.controller') // is twig-bundle 4.4 installed
29
+
&& $container->getParameter('twig.exception_listener.controller') // is twig-bundle deprecated controller set
30
+
&& !$container->hasDefinition('fos_rest.exception_listener') // is deprecated exception_listener disabled
31
+
) {
32
+
thrownew \InvalidArgumentException('You can not disable the "fos_rest.exception.exception_listener" and still have the "twig.exception_controller" enabled.');
33
+
}
34
+
27
35
// when no custom exception controller has been set
28
36
if ($container->hasDefinition('fos_rest.error_listener') &&
0 commit comments