Fix misresolved parameters in debug:config on 3.2
This commit is contained in:
parent
5f0f842cf9
commit
c88bc899d4
@ -83,7 +83,7 @@ EOF
|
||||
$configs = $container->resolveEnvPlaceholders($container->getParameterBag()->resolveValue($configs));
|
||||
|
||||
$processor = new Processor();
|
||||
$config = $processor->processConfiguration($configuration, $configs);
|
||||
$config = $container->resolveEnvPlaceholders($container->getParameterBag()->resolveValue($processor->processConfiguration($configuration, $configs)));
|
||||
|
||||
if (null === $path = $input->getArgument('path')) {
|
||||
$io->title(
|
||||
@ -105,7 +105,7 @@ EOF
|
||||
|
||||
$io->title(sprintf('Current configuration for "%s.%s"', $extensionAlias, $path));
|
||||
|
||||
$io->writeln(Yaml::dump($container->getParameterBag()->resolveValue($config), 10));
|
||||
$io->writeln(Yaml::dump($config, 10));
|
||||
}
|
||||
|
||||
private function compileContainer()
|
||||
@ -130,7 +130,7 @@ EOF
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function getConfigForPath(array $config = array(), $path, $alias)
|
||||
private function getConfigForPath(array $config, $path, $alias)
|
||||
{
|
||||
$steps = explode('.', $path);
|
||||
|
||||
|
@ -48,6 +48,16 @@ class ConfigDebugCommandTest extends WebTestCase
|
||||
$this->assertContains('foo', $tester->getDisplay());
|
||||
}
|
||||
|
||||
public function testParametersValuesAreResolved()
|
||||
{
|
||||
$tester = $this->createCommandTester();
|
||||
$ret = $tester->execute(array('name' => 'framework'));
|
||||
|
||||
$this->assertSame(0, $ret, 'Returns 0 in case of success');
|
||||
$this->assertContains("locale: '%env(LOCALE)%'", $tester->getDisplay());
|
||||
$this->assertContains('secret: test', $tester->getDisplay());
|
||||
}
|
||||
|
||||
public function testDumpUndefinedBundleOption()
|
||||
{
|
||||
$tester = $this->createCommandTester();
|
||||
|
@ -1,2 +1,10 @@
|
||||
imports:
|
||||
- { resource: ../config/default.yml }
|
||||
|
||||
framework:
|
||||
secret: '%secret%'
|
||||
default_locale: '%env(LOCALE)%'
|
||||
|
||||
parameters:
|
||||
env(LOCALE): en
|
||||
secret: test
|
||||
|
@ -19,7 +19,7 @@
|
||||
"php": ">=5.5.9",
|
||||
"symfony/cache": "~3.2",
|
||||
"symfony/class-loader": "~3.2",
|
||||
"symfony/dependency-injection": "~3.2",
|
||||
"symfony/dependency-injection": "~3.2.1|~3.3",
|
||||
"symfony/config": "~2.8|~3.0",
|
||||
"symfony/event-dispatcher": "~2.8|~3.0",
|
||||
"symfony/http-foundation": "~3.1",
|
||||
|
Reference in New Issue
Block a user