Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DI] Don't track merged configs when the extension doesn't expose it#24021
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedAug 29, 2017
So, this happens when the DI extension doesn't call Shouldn't be common, so I wouldn't recommend a new release (yet.) |
gharlan commentedAug 29, 2017
@nicolas-grekas Thanks! I can confirm:
|
4d9342f toa8e6aacCompare
chalasr left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍 Do not deserve an immediate release to me either
jeremyFreeAgent commentedAug 29, 2017
Hi guys, thanks for the fix! What about release that one since every bundle without the fix may have issue? @gharlan confirms that this PR fix the issue without change in the bundles. |
nicolas-grekas commentedAug 29, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@jeremyFreeAgent if you have the issue (do you?), you'd better fix it in your bundle also because its current behavior will prevent correct tracking of ENV vars anyway. |
jeremyFreeAgent commentedAug 29, 2017
@nicolas-grekas I was not talking aboutmy bundle but thecommunity bundles. I mean okay we can PR every bundle we spot with that issue but what aboutbasic users of Symfony that will only update Symfony and expect everything still works? BTW I have PR the fix insymfonycorp/connect-bundle#17 and It was merged :) |
samvdb commentedAug 30, 2017
I can confirm the same bug using 8p/guzzle-bundle. |
nicolas-grekas commentedAug 30, 2017
@samvdb can you submit a PR onhttps://github.com/8p/GuzzleBundle/blob/master/DependencyInjection/GuzzleExtension.php to fix that extension the same way as done insymfonycorp/connect-bundle#17? |
nicolas-grekas commentedAug 30, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
BTW, I'll propose to deprecate not calling |
samvdb commentedAug 30, 2017
@nicolas-grekas PR is open, can confirm this fixes the issue. |
stof commentedAug 30, 2017
@nicolas-grekas could we detect that this method was not called, and use the previous behavior for replacing env placeholders in this case ? This would not solve the shadowing of the config in case a variable is not used anymore in the end. But it would mean that the contain keeps working when the config is now shadowed. |
nicolas-grekas commentedAug 30, 2017
@stof see patch, that should be what L97 does. |
| // serialize config to catch env vars nested in object graphs | ||
| $config =serialize($extension->getProcessedConfigs()); | ||
| // serialize configand containerto catch env vars nested in object graphs | ||
| $config =serialize($config).serialize($container->getDefinitions()).serialize($container->getAliases()).serialize($container->getParameterBag()->all()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
aliases don't need to be serialized. They only have a target and a public flag, and these cannot use parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
fabpot commentedAug 31, 2017
Thank you@nicolas-grekas. |
… expose it (nicolas-grekas)This PR was merged into the 3.3 branch.Discussion----------[DI] Don't track merged configs when the extension doesn't expose it| Q | A| ------------- | ---| Branch? | 3.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#24020| License | MIT| Doc PR | -This is driving me crazy :)Commits-------a8e6aac [DI] Don't track merged configs when the extension doesn't expose it
This is driving me crazy :)