-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Runtime] Possibility to define the env and/or debug key #41608
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
3b37a6d
to
6b3bb0c
Compare
Do you have a use case? If yes can you explain it? If not, better leave this as is IMHO. |
On many of our projects, clients want to redefine the names of variables or prefix them with the name of their application. |
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.
Thanks for the details.
This feature looks reasonable 👍 but I don't like much the names of these options --> "envKey" and "debugKey" To me they sound like some secret key or token related to the environment of the application. Here's a proposal for your consideration: // Before
$_SERVER['APP_RUNTIME_OPTIONS'] = [
'envKey' => 'ENV_MODE',
'debugKey' => 'DEBUG_MODE',
];
// After
$_SERVER['APP_RUNTIME_OPTIONS'] = [
'envVarNames' => [
'env' => 'ENV_MODE',
'debug' => 'DEBUG_MODE',
],
]; |
@nicolas-grekas @javiereguiluz what do I do? Which modification do I apply? |
My suggestion is mainly about using snake_case consistent. How about combining that with the proposal of @javiereguiluz into:
|
Status: Needs Review |
c6c0542
to
2548a0a
Compare
Thank you @maxhelias. |
This PR was merged into the 5.4 branch. Discussion ---------- [Runtime] tweak config for env var names | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Tweaking #41608 Commits ------- c4ef4d7 [Runtime] tweak config for env var names
As the
Dotenv
class allows to choose theenvKey
and thedebugKey
, it could be interesting to be able to modify it also via the Runtime component.Example :