Skip to content

Commit 9dffa6f

Browse files
committed
merged branch tyx/fix/form-profiling (PR symfony#9137)
This PR was merged into the master branch. Discussion ---------- [Form] form_debug.xml should be loaded only if form config is enabled | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Explication here: symfony@1972a91#commitcomment-4187567 Commits ------- b668e24 form_debug.xml should be loaded only if form config is enabled
2 parents 803d434 + b668e24 commit 9dffa6f

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)