Skip to content

Commit

Permalink
bug #20714 [FrameworkBundle] Fix unresolved parameters from default c…
Browse files Browse the repository at this point in the history
…onfigs in debug:config (chalasr)

This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix unresolved parameters from default configs in debug:config

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

When using the `debug:config` command, if the dumped configuration is explicitly defined by the user, then parameters are properly resolved in the output. If it is not, and values come from the bundle default configuration directly, they are not.

Steps to reproduce:
- Checkout the symfony demo
- Run `debug:config twig`
- Look at the `debug` key, it is the `kernel.debug` parameter properly resolved: `true`
- Look at the `cache` key, it is not resolved: `'%kernel.cache_dir%/twig'`

This fixes it by resolving the configs once again after processing the configuration.
ping @weaverryan

Commits
-------

26f588a Fix unresolved parameters from default bundle configs in debug:config
  • Loading branch information
fabpot committed Dec 13, 2016
2 parents 3113f3f + 26f588a commit cd0bb3d
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -90,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln(sprintf('# Current configuration for "%s"', $name));
}

$output->writeln(Yaml::dump(array($extension->getAlias() => $config), 10));
$output->writeln(Yaml::dump(array($extension->getAlias() => $container->getParameterBag()->resolveValue($config)), 10));
}

private function compileContainer()
Expand Down

0 comments on commit cd0bb3d

Please sign in to comment.