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
This commit is contained in:
Fabien Potencier 2016-03-15 17:13:25 +01:00
commit 67fba7dc1e
2 changed files with 2 additions and 2 deletions

View File

@ -654,7 +654,7 @@ class Configuration implements ConfigurationInterface
->children()
->scalarNode('cache')->defaultValue('file')->end()
->scalarNode('file_cache_dir')->defaultValue('%kernel.cache_dir%/annotations')->end()
->booleanNode('debug')->defaultValue('%kernel.debug%')->end()
->booleanNode('debug')->defaultValue($this->debug)->end()
->end()
->end()
->end()

View File

@ -169,7 +169,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
'annotations' => array(
'cache' => 'file',
'file_cache_dir' => '%kernel.cache_dir%/annotations',
'debug' => '%kernel.debug%',
'debug' => true,
),
'serializer' => array(
'enabled' => false,