-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Fix unresolved parameters from default configs in debug:config #20714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👍 Status: Reviewed |
Maybe not what you'd expect, yet the current behavior on 2.7 is consistent, not buggy. |
@nicolas-grekas Not sure to understand. Why should parameters be resolved only for explicitly defined configuration? On the current 2.7, I can get both |
Maybe it's not clear what I mean. config: twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
form_themes:
- "bootstrap_3_layout.html.twig"
- "form/fields.html.twig" I find the |
So isn't this the expected behavior? Is there any blocker for merging this as a bugfix? |
👍 |
1 similar comment
👍 |
Thanks for fixing this bug @chalasr. |
…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
This PR was merged into the 3.2 branch. Discussion ---------- Fix misresolved parameters in debug:config on 3.2 | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a This fixes parameters resolution (classic and env ones) in `debug:config`, again. Merging #20714 broke the fix resolving env parameters made in #20688, and anyway it was mismerged (#20714 was not applied when using the `path` argument, my bad, I should have prevented it). This adds a test which prevents regressions so I hope this is is the last PR on this subject. The buggy output is unfortunately part of the last 3.2 release... It can easily be confirmed by running `debug:config doctrine` on a fresh symfony-demo project Commits ------- c88bc89 Fix misresolved parameters in debug:config on 3.2
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:
debug:config twig
debug
key, it is thekernel.debug
parameter properly resolved:true
cache
key, it is not resolved:'%kernel.cache_dir%/twig'
This fixes it by resolving configs once again after processing the configuration.
ping @weaverryan