Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:2.7fromchalasr:debug-config-resolve-defaults
Dec 13, 2016

Conversation

@chalasr
Copy link
Member

@chalasrchalasr commentedDec 1, 2016
edited
Loading

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

When using thedebug: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
  • Rundebug:config twig
  • Look at thedebug key, it is thekernel.debug parameter properly resolved:true
  • Look at thecache key, it is not resolved:'%kernel.cache_dir%/twig'

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

ogizanagi and yceruto reacted with thumbs up emoji
@ogizanagi
Copy link
Contributor

👍

Status: Reviewed

@nicolas-grekas
Copy link
Member

Maybe not whatyou'd expect, yet the current behavior on 2.7 is consistent, not buggy.
If we need to reconsider this, we should do it on 3.3 IMHO.

@chalasr
Copy link
MemberAuthor

chalasr commentedDec 1, 2016
edited
Loading

@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%kernel.root_dir% for a key and its value for another, imho it's not a consistent behavior. Whether we dump placeholders or values, but not both.

@chalasr
Copy link
MemberAuthor

chalasr commentedDec 1, 2016
edited
Loading

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"

output before:
before

output after:
after

I find thedebug:config command especially useful to be aware of what is configured implicitly (i.e. default bundle configurations), which is no more true if the output doesn't contain real values, and quite confusing if one key contains the real value and the second doesn't.

yceruto and ogizanagi reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas added this to the2.7 milestoneDec 6, 2016
@chalasr
Copy link
MemberAuthor

So isn't this the expected behavior? Is there any blocker for merging this as a bugfix?

@nicolas-grekas
Copy link
Member

👍

1 similar comment
@stof
Copy link
Member

👍

@fabpot
Copy link
Member

Thanks for fixing this bug@chalasr.

@fabpotfabpot merged commit26f588a intosymfony:2.7Dec 13, 2016
fabpot added a commit that referenced this pull requestDec 13, 2016
…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/aWhen 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@weaverryanCommits-------26f588a Fix unresolved parameters from default bundle configs in debug:config
@chalasrchalasr deleted the debug-config-resolve-defaults branchDecember 13, 2016 08:15
This was referencedDec 13, 2016
fabpot added a commit that referenced this pull requestDec 14, 2016
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/aThis 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 projectCommits-------c88bc89 Fix misresolved parameters in debug:config on 3.2
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

6 participants

@chalasr@ogizanagi@nicolas-grekas@stof@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp