-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Revert deprecation of the "--env" and "--no-debug" console options #28984
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
In Nodejs
|
Thanks for the hint @giansalex The reason why these settings have been removed is because of their chicken-and-egg nature: The way it worked was using a hardcoded convention and that led to issues and special edge-cases we decided were not worth it. On Windows, you can use the The linked PR is about not doing it in core anymore, for the given reasons - but you can do it with some code of your own. |
I read the code, my comment above is wrong: there is nothing hardcoded in the Component to deal with --env/--no-debug. |
…pplication::bootstrapEnv() (chalasr) This PR was merged into the 4.2-dev branch. Discussion ---------- [FrameworkBundle] Define APP_ENV/APP_DEBUG from argv via Application::bootstrapEnv() | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #28984, #29126 | License | MIT | Doc PR | todo Replaces #29126. Commits ------- bbd5682 [FrameworkBundle] Define APP_ENV/APP_DEBUG from argv via Application::bootstrapEnv()
Resolved in #29154: we are going to KEEP the deprecation, but that's going to be mostly internal, as we're also providing an alternative to have |
Reverted in #29204 (yes, going back and forth here :) ) |
…-env and --no-debug console options (chalasr) This PR was merged into the 4.2-dev branch. Discussion ---------- [FrameworkBundle][WebServerBundle] Revert deprecation of --env and --no-debug console options This reverts commit 9f60ff8. This reverts commit 31b5615. | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #28984 | License | MIT | Doc PR | - Working on recipes with @weaverryan, we figured out that this deprecation is just making our life more difficult. Let's revert it. Same as #29126, reverts #28745 and #28653 Commits ------- 443f8ad [FrameworkBundle][WebServerBundle] Revert deprecation of --env and --no-debug console options
the deprecation of the console flags
--env
and--no-debug
have some bad sideffects:all-in-all its a bad DX
i tested it locally with my symfony 3.4 app but it should make no difference in the case of passing env variables.
vs
vs
so in fact, with this change the cli is broken on windows. of course a lot of people would say use bash but i also like diversity here, developer should have choices.
also the handy autocomplete possibility with clink on windows and bash-completion on linux is gone with this change. environment variables are cool but not the holy grail for everything. there is a reason for having flags on commands. imagine you have to call all commands like this:
first we should keep in mind that we don't all have the same environment. we have different hoster, webservers and shells out there. not many are optimized for symfony. not everybody is using linux, not everybody has the ability to easily set env variables on their hoster, ...
as i switched to .env i really had a very bad experience with it. hashed/crypted passwords have a
$
in them, passing them to php was horrible. it is the opposite of dry and escaping often is complicated. secret variables on gitlab can't easily be escaped https://gitlab.com/gitlab-org/gitlab-ce/issues/45173, nginx also has its quirks with env variables, and getting the env variables in bash wasn't straight forward (without puppet automation i really would have cried).having a 2nd entry point to quickly use the debug bar on the production server is really very helpful. so multi-environment is nothig we don't use out there. i wouldn't say its uncommon. clearing cache for both environments then gets cumbersome and we are back of having shell scripts or task runner in our project which abstract our now complicated calls.
there are many deprecations i understand, sometimes it is necessary to force user/developer to go in a certain direction. for example, i think its really good to drop the base controller to force the dependency injection. many applications out there are forcing in a specific direction. often this is good but in the last year i noticed that the enforcement in specific directions is too strong and restictive. for example .dev domain hardcoded to https in chrome and firefox, firefox drop of legacy extensions, force to require php 7.2 in a lib which simply does not require it, force to upgrade software to major versions in each release without a LTS, all interfaces are getting simpler and simpler and advanced user are denied to setup their app as they want (i remember icq, the interface was simple but there was a advanced mode), ...
we are all humans, we all have limited time, if enforcement is stealing our time and forces us to build workarounds to archive what we already have, maybe then the enforcement was not the right one.
we are software architects, we can find a lot of analogies with architects but in as software architects we have the luxery that we don't need to decide if we want a flat roof or a pitched roof, we work virtual and simply can have both. its a good feature to read settings from the env but it is even better if i can simply override it with a human readable command.
in my wget example from above we can run
wget
and rely on the correct env setting. which is quite sure for a automated run but if i log in with my user and forget to do a su my complete settings are wrong. as soon as i have user interaction i really prefer to provide parameters.this is too much pain for no real gain. why removing a handy feature?
also see:
The text was updated successfully, but these errors were encountered: