Skip to content

Commit b668e24

Browse files
committed
form_debug.xml should be loaded only if form config is enabled
1 parent 803d434 commit b668e24

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
*/
3131
class FrameworkExtension extends Extension
3232
{
33+
private $formConfigEnabled = false;
34+
3335
/**
3436
* Responds to the app.config configuration parameter.
3537
*
@@ -90,6 +92,7 @@ public function load(array $configs, ContainerBuilder $container)
9092
}
9193

9294
if ($this->isConfigEnabled($container, $config['form'])) {
95+
$this->formConfigEnabled = true;
9396
$this->registerFormConfiguration($config, $container, $loader);
9497
$config['validation']['enabled'] = true;
9598
}
@@ -218,7 +221,10 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $
218221
return;
219222
}
220223

221-
$loader->load('form_debug.xml');
224+
if (true === $this->formConfigEnabled) {
225+
$loader->load('form_debug.xml');
226+
}
227+
222228
$loader->load('profiling.xml');
223229
$loader->load('collectors.xml');
224230

0 commit comments

Comments
 (0)