-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] Add Enum Env Var Processor #46564
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
Hey! I think @ruudk has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
This might miss some pieces as I think some regexps like this one might prevent using FQCN in symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php Line 47 in bbf25d6
|
Please update the description of the PR to make it clear what you're proposing. I could guess by looking at the tests, but providing a proper PR description is nonetheless a good thing to help ppl understand what this is about, and start the doc later on. |
src/Symfony/Component/DependencyInjection/Loader/Configurator/EnvConfigurator.php
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/Fixtures/IntBackedEnum.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/Loader/Configurator/EnvConfiguratorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Show resolved
Hide resolved
A next step could be to find a way to make autowiring do its part, so that the 👍 |
Can you please rebase on latest 6.2? We don't merge PRs with merge commits. If you want to squash while doing so, please do (we'll do it when merging otherwise.) |
Rebase and squash is done! |
Thank you @jack-worman. |
Add the ability to transform env variables into \BackedEnums.
For example, you could now autowire an enum from an environment variable: