[wp-trac] [WordPress Trac] #36561: Deprecated notices should be classified as such.

WordPress Trac noreply at wordpress.org
Sun Apr 17 11:16:44 UTC 2016


#36561: Deprecated notices should be classified as such.
-------------------------+-----------------------------
 Reporter:  jrf          |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 All errors triggers should be classified with the appropriate error level.

 Most notably, the
 `_deprecated_function()`/`_deprecated_constructor()`/`_deprecated_file()`/`_deprecated_argument()`/`_doing_it_wrong()`
 function do not pass an appropriate error level to `trigger_error()`.

 For the deprecated function group, the most appropriate level seems to be
 `E_USER_DEPRECATED` which was introduced in PHP 5.3.0.

 For `_doing_it_wrong()` an `E_USER_NOTICE` (or `E_USER_WARNING`) seems
 more appropriate.

 Fixed in the accompanying patch.

 For backward compatibility with PHP 5.2, a define for `E_USER_DEPRECATED`
 has been added to `wp-includes/compat.php` which follows the same logic as
 used in SimplePie for consistency:
 https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-
 simplepie.php#L699

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36561>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list