[wp-trac] [WordPress Trac] #50992: Consider removing the ability to alter the list of environment types

WordPress Trac noreply at wordpress.org
Sat Aug 22 17:59:53 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:  dev-feedback    |     Focuses:
----------------------------+---------------------

Comment (by Clorith):

 I'm torn on this one, the purpose here was to capture the weird edge cases
 of those who do not want to conform to the default strings many use, and
 as those relying on checking the environment type should ideally have a
 fallback if it's an unrecognized type (in a perfect world, of course, it
 may or may not be what they do).

 A quick scan of plugins using the new function already shows that it's
 mostly used to see if a given string is the environment, to treat it a
 given way, so allowing someone who wants to call their environment `Dolly`
 is still a thing that won't negatively affect anything as I can see it
 right now.

 That said, it does lose its purpose if those strings can't be identified
 by the code looking it up in the grand scheme of things, so perhaps you're
 right that a deprecation notice here may be the way to go, however noble
 the initial intent behind it was :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50992#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list