[wp-trac] [WordPress Trac] #57487: Add support for "development mode"
WordPress Trac
noreply at wordpress.org
Mon Jul 17 23:10:23 UTC 2023
#57487: Add support for "development mode"
-------------------------------------------------+-------------------------
Reporter: azaozz | Owner: flixos90
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.3
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs-dev- | Focuses:
note |
-------------------------------------------------+-------------------------
Comment (by azaozz):
Replying to [comment:67 peterwilsoncc]:
> how strongly do you feel about this? You're the 6.3 tech lead, so it's
your call.
No strong feeling at all, just trying to brainstorm :)
> We can always add more supported development mode values
I'll be a bit worried about changing it much though. As far as I see the
last thing that can be added would be to return when a development mode is
set, regardless of which particular flavor.
> If there is a real use-case where it becomes useful to check for any
development mode
Yes, there are few although I couldn't get the time to test and implement
them. One is to change `_doing_it_wrong()` behavior (or the new proposed
function that would replace it) depending on whether dev. mode is set.
Thinking it may even throw a fatal error in some cases on a particularly
"wrong" things.
Another is to reexamine all uses of `WP_DEBUG`, maybe make some of them
conditional on dev. mode, and maybe make some throw more severe
errors/warnings.
> I'd propose that the default behavior for this function if no explicit
mode is passed (i.e. $mode = null) would be to return true if
wp_get_development_mode() returns any valid value rather than adding an
explicit "any"
Yep, I'm with @joemcgill here. Thinking that would be best. Thanks for the
suggestion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57487#comment:68>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list