Skip to content

Commit 3322e01

Browse files
committed
Fix TwigBundle config
1 parent c490b0f commit 3322e01

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/Fixtures/app/AppKernel.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
152152
]);
153153
}
154154

155+
$twigConfig = ['strict_variables' => '%kernel.debug%'];
156+
if (class_exists(ErrorRenderer::class)) {
157+
$twigConfig['exception_controller'] = null;
158+
}
159+
$c->prependExtensionConfig('twig', $twigConfig);
160+
155161
if ($_SERVER['LEGACY'] ?? true) {
156162
$c->prependExtensionConfig('nelmio_api_doc', [
157163
'sandbox' => [

tests/Fixtures/app/config/config_common.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ doctrine:
2828
auto_generate_proxy_classes: '%kernel.debug%'
2929
auto_mapping: true
3030

31-
twig:
32-
strict_variables: '%kernel.debug%'
33-
exception_controller: null
34-
3531
mercure:
3632
hubs:
3733
default:

0 commit comments

Comments
 (0)