File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 77use Symfony \Bundle \SecurityBundle \SecurityBundle ;
88use Symfony \Bundle \TwigBundle \TwigBundle ;
99use Symfony \Component \Config \Loader \LoaderInterface ;
10+ use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
11+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
1012use Symfony \Component \HttpKernel \Kernel ;
1113
12- final class TestKernel extends Kernel
14+ final class TestKernel extends Kernel implements CompilerPassInterface
1315{
1416 private $ testCase ;
1517
@@ -62,6 +64,21 @@ public function registerContainerConfiguration(LoaderInterface $loader)
6264 } else {
6365 $ loader ->load (__DIR__ .'/config/config.yml ' );
6466 }
67+
68+ $ loader ->load (function (ContainerBuilder $ container ) {
69+ $ container ->addCompilerPass ($ this );
70+ });
71+ }
72+
73+ /**
74+ * {@inheritdoc}
75+ */
76+ public function process (ContainerBuilder $ container )
77+ {
78+ // disabled http_exception_listener because it flatten exception to html response
79+ if ($ container ->has ('http_exception_listener ' )) {
80+ $ container ->removeDefinition ('http_exception_listener ' );
81+ }
6582 }
6683
6784 private function basePath ()
You can’t perform that action at this time.
0 commit comments