-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[RFC][Dotenv] Add a way to retrieve env vars not only via DI #34173
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
Comments
Yesterday I actually tried |
at this point, isnt using maybe related to #33758 im a bit skeptical about making DI responsible for env var management (and e.g extract it standalone), so outside DI context it's just PHP, thus |
I think it is related. Like said in the linked issue, it would be nice to have access to processors. Although I don't understand what you mean by |
@Neirda24 ha, i meant the current architecture fits the DI component mostly. |
hm actually it's only matter of changing the current visibility to solve your issue; the |
Thank you for this suggestion. |
Yes. |
Thank you for this suggestion. |
Friendly ping? Should this still be open? I will close if I don't hear anything. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
Description
Inspired by this: #25693
I understand that your application should not be aware of where your configuration come from. However at some point you had to configure it using env variables.
What I was thinking is being able to access env Variables through the container when it is booted.
Sometimes we need to configure a static property of a non service class that will depend on the OS (it might be because of bad design or whatever but still it happens).
Example
would be nice if we had something like
or event just resolve env in the
getParameter
method.I don't know if the need is clear enough. Please do not hesitate to tell me otherwise.
WDYT ?
The text was updated successfully, but these errors were encountered: