Description
Description
Hi,
first of all, I'm well aware that this same proposal was made by @fabpot years ago in #34042, and abandoned because it was feared that the hassle for maintainers and community would be prohibitively large.
So first I'll write the proposal and afterwards why I bring the topic up again.
The first part is easy because I can just quote Fabien from the original issue:
Symfony environments, why is it confusing?
We now manipulate environment variables everywhere in Symfony.
Most cloud providers also have environments.You are testing the prod environment (the Symfony one) for your development
environment (local machine). See what I mean?A Symfony environment is a way to switch the configuration to a different set of values: from dev to prod or the other way around. Or test.
I'd like to rename it to Symfony mode.
APP_ENV=prod to APP_MODE=prod
You are testing the prod mode on your development environment.
Please note that I'd like to talk only about the APP_MODE here, not about the profiler renaming the original ticket also addressed.
Why repeat this suggestion although it was abandoned?
- I had really looked forward to this change back in 2019 and was disappointed when it wasn't realized. Because for me the renaming just makes sense and feels "natural".
- After all these years, the confusion is still there, especially when working on systems with different system environments (which should be all professionally developed systems). I'm in a position where I discuss framework topics and Symfony configuration a lot, and it is frustrating needing to have to repeat the distinction between the different environment terms. Therefore I often even call the Symfony environment "mode" in the spirit of the past proposal.
- Also, I have seen teams that try to create one Symfony environment for each system environment they use, e.g. "stage". This means they used each Symfony environment exclusively on the corresponding system environment, leading the feature ad absurdum. I'm confident that renaming would avoid this.
- With more than 150 thumbs-up votes, it is by far the most-upvoted proposal ever in Symfony, so although that's of course a fuzzy metric, I'd say the community would welcome this change (it would be less fuzzy if the issue didn't violate the single-responsibility principle 🙂).
- The Symfony release cycle with deprecations and removals is even better established than in 2019/2020 and people are used to follow well-communicated BC breaks; also tooling for automated migrations is better
In the numerous original comments, there weren't many points against renaming - mostly effort-related, or saying that comparable frameworks in other languages also use "environment" (but it's also confusing in those). There were multiple suggestions for the name, but by my interpretation most people were fine with APP_MODE.
For these reasons I'm interested if there's a second chance for this proposal, be it APP_MODE or something else (tagging @nicolas-grekas because I think your opinion led to abandoning it originally). If there was later re-discussion on the topic I'm not aware of, I'm of course interested in outcome or links.
Thank you for your thoughts!
Example
No response