[wp-trac] [WordPress Trac] #57487: Add support for "development mode"
WordPress Trac
noreply at wordpress.org
Mon Jul 17 14:37:31 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 flixos90):
Replying to [comment:55 azaozz]:
> Seems `wp_in_development_mode()` lacks the ability to detect "any" dev.
mode. I.e. a possible (desirable) future use of development mode would be
to do strict checks, and throw more fatal errors. That should be enabled
in "any" dev. mode.
Why is that needed now? The reason that this ticket was created was due to
a need for ''specific'' development modes. The question "Is my site in
(general) development mode?" could have just been as easily answered by
`WP_DEBUG`.
All use-cases that we currently have are for specific development modes.
If there is a real use-case where it becomes useful to check for `any`
development mode, we can reconsider, but it's a long-standing core
philosophy to not make API decisions without concrete use-cases, so this
should be considered only if/when it's actually needed.
We can always add more supported development mode values, and we can
always add a default and make the function parameter optional, without
breaking backward compatibility. We can't do the reverse though. So
decisions for ''adding'' something should be based on actual use-cases
present.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57487#comment:62>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list