Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c88bc89

Browse filesBrowse files
committed
Fix misresolved parameters in debug:config on 3.2
1 parent 5f0f842 commit c88bc89
Copy full SHA for c88bc89

File tree

4 files changed

+22
-4
lines changed
Filter options

4 files changed

+22
-4
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8383
$configs = $container->resolveEnvPlaceholders($container->getParameterBag()->resolveValue($configs));
8484

8585
$processor = new Processor();
86-
$config = $processor->processConfiguration($configuration, $configs);
86+
$config = $container->resolveEnvPlaceholders($container->getParameterBag()->resolveValue($processor->processConfiguration($configuration, $configs)));
8787

8888
if (null === $path = $input->getArgument('path')) {
8989
$io->title(
@@ -105,7 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
105105

106106
$io->title(sprintf('Current configuration for "%s.%s"', $extensionAlias, $path));
107107

108-
$io->writeln(Yaml::dump($container->getParameterBag()->resolveValue($config), 10));
108+
$io->writeln(Yaml::dump($config, 10));
109109
}
110110

111111
private function compileContainer()
@@ -130,7 +130,7 @@ private function compileContainer()
130130
*
131131
* @return mixed
132132
*/
133-
private function getConfigForPath(array $config = array(), $path, $alias)
133+
private function getConfigForPath(array $config, $path, $alias)
134134
{
135135
$steps = explode('.', $path);
136136

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ public function testDumpBundleOption()
4848
$this->assertContains('foo', $tester->getDisplay());
4949
}
5050

51+
public function testParametersValuesAreResolved()
52+
{
53+
$tester = $this->createCommandTester();
54+
$ret = $tester->execute(array('name' => 'framework'));
55+
56+
$this->assertSame(0, $ret, 'Returns 0 in case of success');
57+
$this->assertContains("locale: '%env(LOCALE)%'", $tester->getDisplay());
58+
$this->assertContains('secret: test', $tester->getDisplay());
59+
}
60+
5161
public function testDumpUndefinedBundleOption()
5262
{
5363
$tester = $this->createCommandTester();
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
imports:
22
- { resource: ../config/default.yml }
3+
4+
framework:
5+
secret: '%secret%'
6+
default_locale: '%env(LOCALE)%'
7+
8+
parameters:
9+
env(LOCALE): en
10+
secret: test

‎src/Symfony/Bundle/FrameworkBundle/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=5.5.9",
2020
"symfony/cache": "~3.2",
2121
"symfony/class-loader": "~3.2",
22-
"symfony/dependency-injection": "~3.2",
22+
"symfony/dependency-injection": "~3.2.1|~3.3",
2323
"symfony/config": "~2.8|~3.0",
2424
"symfony/event-dispatcher": "~2.8|~3.0",
2525
"symfony/http-foundation": "~3.1",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.