-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DI] Fix resolving env vars when compiling a ContainerBuilder #23940
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
/** | ||
* Replaces env var placeholders by their current values. | ||
*/ | ||
class ResolveEnvPlaceholdersPass extends AbstractRecursivePass |
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.
implementation is similar to the one in ResolveParameterPlaceHoldersPass
/** | ||
* Replaces "%env(FOO)%" references by their placeholder, keeping regular "%parameters%" references as is. | ||
*/ | ||
public function resolveEnvReferences(array $value) |
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.
Method has been introduced a few days ago, never released yet - thus no BC break here.
30f362d
to
32f844f
Compare
32f844f
to
a09fb37
Compare
@nicolas-grekas i reproduced the array-to-string conversion on 3.3 with That now produces The mixed runtime/compiletime works great now, inlucding leaving out default and/or real values. It just works as expected 👍 |
a09fb37
to
9219594
Compare
fixed, should be good then |
…der (nicolas-grekas) This PR was merged into the 3.3 branch. Discussion ---------- [DI] Fix resolving env vars when compiling a ContainerBuilder | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - As spotted by @ro0NL, `$container->compile(true)` doesn't resolve direct env var references found in service definitions. Fixed here. Commits ------- 9219594 [DI] Fix resolving env vars when compiling a ContainerBuilder
As spotted by @ro0NL,
$container->compile(true)
doesn't resolve direct env var references found in service definitions. Fixed here.