Skip to content

Commit

Permalink
bug #23157 Fix the usage of FrameworkBundle in debug mode without Sto…
Browse files Browse the repository at this point in the history
…pwatch (stof)

This PR was merged into the 3.4 branch.

Discussion
----------

Fix the usage of FrameworkBundle in debug mode without Stopwatch

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

#23148 removed the loading of the debug.xml file when Stopwatch is not installed.
While all services defined in it are related to Stopwatch, the parameter was not (it is related to dumping the debug container in the compiler pass), which was breaking the usage of the bundle in debug mode without Stopwatch (exception triggered in the compiler pass)

Commits
-------

2ea26c1 Fix the usage of FrameworkBundle in debug mode without Stopwatch
  • Loading branch information
fabpot committed Jun 13, 2017
2 parents cc2363f + 2ea26c1 commit 17d23a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -647,6 +647,10 @@ private function registerDebugConfiguration(array $config, ContainerBuilder $con

$debug = $container->getParameter('kernel.debug');

if ($debug) {
$container->setParameter('debug.container.dump', '%kernel.cache_dir%/%kernel.container_class%.xml');
}

if ($debug && class_exists(Stopwatch::class)) {
$loader->load('debug.xml');
}
Expand Down
4 changes: 0 additions & 4 deletions src/Symfony/Bundle/FrameworkBundle/Resources/config/debug.xml
Expand Up @@ -4,10 +4,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<parameters>
<parameter key="debug.container.dump">%kernel.cache_dir%/%kernel.container_class%.xml</parameter>
</parameters>

<services>
<defaults public="false" />

Expand Down

0 comments on commit 17d23a7

Please sign in to comment.