[wp-trac] [WordPress Trac] #50992: Consider removing the ability to alter the list of environment types
WordPress Trac
noreply at wordpress.org
Thu Aug 27 18:37:14 UTC 2020
#50992: Consider removing the ability to alter the list of environment types
----------------------------------------+---------------------
Reporter: johnbillion | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.5.1
Component: Bootstrap/Load | Version: 5.5
Severity: normal | Resolution:
Keywords: needs-patch needs-dev-note | Focuses:
----------------------------------------+---------------------
Comment (by elrae):
I'm not proposing we don't have a list of standard ones, I'm proposing we
don't remove flexibility to change them. All plugins / hosts can have a
switch statement and if they don't recognize my custom environment name,
run the production mode. When you transfer hosts from WPEngine to another
one they may or may not have the same environments, and they most
definitely run different settings/code depending on that environment. What
happens in the scenario above when I want my own environment variable so I
can test debug on my plugin and run Yoast in production mode? I can't, I
have to come up with my own new mechanism of defining an environment.
That's where we are today, so what's different? Might as well rip this
code out and tell all hosts to use the same environment names. If a
developer calls their staging "stg" this was an intentional code level
decision, and if they want the host they migrate to understand it they'll
go into the code and change it. The worry here makes it seem as though
changing these values is trivial or easily done in the admin; it's not.
It's a developer choice and should be.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50992#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list