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

[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

Merged
fabpot merged 1 commit intosymfony:3.3fromnicolas-grekas:di-config-ser
Aug 31, 2017

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?3.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#24020
LicenseMIT
Doc PR-

This is driving me crazy :)

@nicolas-grekas
Copy link
MemberAuthor

So, this happens when the DI extension doesn't callExtension::processConfiguration(), which is the case in PropelBundle (fixed inpropelorm/PropelBundle#461.)

Shouldn't be common, so I wouldn't recommend a new release (yet.)

@gharlan
Copy link
Contributor

@nicolas-grekas Thanks! I can confirm:

  1. It works with your PropelBundle fix, without this pr
  2. It works with your pr without changing PropelBundle
  3. And of course, it also works with both changes together.

@nicolas-grekasnicolas-grekas changed the title[DI] Track env placeholders found in the container[DI] Don't track merged configs when the extension doesn't expose itAug 29, 2017
Copy link
Member

@chalasrchalasr left a 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
Copy link
Contributor

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
Copy link
MemberAuthor

nicolas-grekas commentedAug 29, 2017
edited
Loading

@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
Copy link
Contributor

@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
Copy link

I can confirm the same bug using 8p/guzzle-bundle.

@nicolas-grekas
Copy link
MemberAuthor

@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
Copy link
MemberAuthor

nicolas-grekas commentedAug 30, 2017
edited
Loading

BTW, I'll propose to deprecate not callingExtension::processConfiguration() in 3.4, and throw an exception in 4.0

jeremyFreeAgent reacted with thumbs up emoji

@samvdb
Copy link

@nicolas-grekas PR is open, can confirm this fixes the issue.
8p/EightPointsGuzzleBundle#120

@stof
Copy link
Member

@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.
Otherwise, it means we broke BC in a patch version.

@nicolas-grekas
Copy link
MemberAuthor

@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());
Copy link
Member

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.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commita8e6aac intosymfony:3.3Aug 31, 2017
fabpot added a commit that referenced this pull requestAug 31, 2017
… 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
@nicolas-grekasnicolas-grekas deleted the di-config-ser branchSeptember 1, 2017 06:57
@fabpotfabpot mentioned this pull requestSep 11, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof requested changes

@fabpotfabpotfabpot approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

8 participants

@nicolas-grekas@gharlan@jeremyFreeAgent@samvdb@stof@fabpot@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp