merged branch tyx/fix/form-profiling (PR #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:
1972a91653 (commitcomment-4187567)

Commits
-------

b668e24 form_debug.xml should be loaded only if form config is enabled
This commit is contained in:
Fabien Potencier 2013-09-26 21:08:50 +02:00
commit 9dffa6fdb8

View File

@ -30,6 +30,8 @@ use Symfony\Component\Config\FileLocator;
*/
class FrameworkExtension extends Extension
{
private $formConfigEnabled = false;
/**
* Responds to the app.config configuration parameter.
*
@ -90,6 +92,7 @@ class FrameworkExtension extends Extension
}
if ($this->isConfigEnabled($container, $config['form'])) {
$this->formConfigEnabled = true;
$this->registerFormConfiguration($config, $container, $loader);
$config['validation']['enabled'] = true;
}
@ -218,7 +221,10 @@ class FrameworkExtension extends Extension
return;
}
$loader->load('form_debug.xml');
if (true === $this->formConfigEnabled) {
$loader->load('form_debug.xml');
}
$loader->load('profiling.xml');
$loader->load('collectors.xml');