Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DependencyInjection] Allow injecting the current env into php config c… #17367

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

Closed
nicolas-grekas opened this issue Oct 19, 2022 · 2 comments · Fixed by #17639
Closed

[DependencyInjection] Allow injecting the current env into php config c… #17367

nicolas-grekas opened this issue Oct 19, 2022 · 2 comments · Fixed by #17639
Labels
actionable Clear and specific issues ready for anyone to take them. DependencyInjection help wanted Issues and PRs which are looking for volunteers to complete them.
Milestone

Comments

@nicolas-grekas
Copy link
Member

Q A
Feature PR symfony/symfony#47906
PR author(s) @HypeMC
Merged in 6.2
@nicolas-grekas nicolas-grekas added this to the 6.2 milestone Oct 19, 2022
@wouterj
Copy link
Member

wouterj commented Oct 19, 2022

We don't have any documentation about which parameters are accepted in the closure. Maybe it's a good idea to add them somewhere in the Service Container guide.

@wouterj wouterj added help wanted Issues and PRs which are looking for volunteers to complete them. actionable Clear and specific issues ready for anyone to take them. labels Oct 19, 2022
@wouterj
Copy link
Member

wouterj commented Oct 19, 2022

As for the specific use-case, it seems like we only documented the #[When] attribute, not the other formats: https://symfony.com/doc/current/service_container.html#limiting-services-to-a-specific-symfony-environment I think we should add them to the lowest version they apply (5.4?) and use the string $env parameter in the 6.2 branch after this change was merged up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. DependencyInjection help wanted Issues and PRs which are looking for volunteers to complete them.
Projects
None yet
3 participants