Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67fba7d

Browse files
committed
minor #18139 [FrameworkBundle] Replace kernel.debug with member variable (patrick-mcdougle)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] Replace kernel.debug with member variable | Q | A | ------------- | --- | Branch | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | unlikely | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a While digging around I noticed that someone added debug to the constructor, but didn't replace all the `%kernel.debug%` strings. This PR is just to improve consistency. Technically this could cause a BC break if someone was using a compiler pass to alter the argument of the constructor while the other config was relying on `%kernel.debug%`, but the likelihood of that is probably very low. Commits ------- 181f256 Use debug member variable
2 parents fef2474 + 181f256 commit 67fba7d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ private function addAnnotationsSection(ArrayNodeDefinition $rootNode)
654654
->children()
655655
->scalarNode('cache')->defaultValue('file')->end()
656656
->scalarNode('file_cache_dir')->defaultValue('%kernel.cache_dir%/annotations')->end()
657-
->booleanNode('debug')->defaultValue('%kernel.debug%')->end()
657+
->booleanNode('debug')->defaultValue($this->debug)->end()
658658
->end()
659659
->end()
660660
->end()

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ protected static function getBundleDefaultConfig()
169169
'annotations' => array(
170170
'cache' => 'file',
171171
'file_cache_dir' => '%kernel.cache_dir%/annotations',
172-
'debug' => '%kernel.debug%',
172+
'debug' => true,
173173
),
174174
'serializer' => array(
175175
'enabled' => false,

0 commit comments

Comments
 (0)