[wp-trac] [WordPress Trac] #31839: Setting error reporting level for wp_debug_mode

WordPress Trac noreply at wordpress.org
Mon Oct 16 07:17:04 UTC 2023


#31839: Setting error reporting level for wp_debug_mode
----------------------------+---------------------
 Reporter:  aifrim          |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:
Component:  Bootstrap/Load  |     Version:  4.1.1
 Severity:  normal          |  Resolution:
 Keywords:  dev-feedback    |     Focuses:
----------------------------+---------------------

Comment (by Jonathandejong):

 How can we finally make this a thing please?!

 It's been 9 years. It is such a simple simple thing that means giving
 power back to the developer with absolutely no drawbacks.

 Especially now when a lot of people are facing the necessity to upgrade
 from PHP 7.4 to 8.n and a lot of WordPress eco system not quite caught up
 yet this is really REALLY useful.

 why? Because the way WP by default sets the error_reporting means every
 single deprecation notice is also logged. This makes the use of WP_DEBUG
 basically unusable unless we override it.

 I detail this a bit more in my duplicate here:
 https://core.trac.wordpress.org/ticket/59128

 I don't agree one bit with the argument that we shouldn't allow developers
 control over what error_reporting level is set.
 Why should we not? It's not up to WP to decide that.
 And even if we did entertain the idea that this could mean that developers
 silence important messages.. guess what? They already can.

 I've seen in many poorly written plugins that the author overrides the
 error_reporting in runtime in their own code. Which is horrible of course,
 but it's already possible to do like this.
 So why not give the developers that actually run their WP instance the
 control to do it appropriately.

 Right now, we have to run a custom MU plugin to override the deprecation
 flood in order to be able to run PHP 8.n on our dev environments and still
 make use of WP_DEBUG.
 If we don't, most sites throw tens of log entries for WP core and third
 party plugins which we cannot do anything about anyway.

 What do I need to do to get this into core now?? Please.

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


More information about the wp-trac mailing list