Make WordPress Core

Opened 19 months ago

Last modified 6 months ago

#23062 new enhancement

Issue warnings for deprecated and wrong behavior in pre-release builds

Reported by: nacin Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Bootstrap/Load Keywords:
Focuses: Cc:


Coming out of #22873 and the associated development chat:

_doing_it_wrong(), _deprecated_argument(), _deprecated_file(), and _deprecated_function() should issue an E_USER_WARNING up to and including RC1, and an E_USER_NOTICE otherwise.

Attachments (1)

23062.diff (4.1 KB) - added by nacin 19 months ago.

Download all attachments as: .zip

Change History (7)

nacin19 months ago

comment:1 nacin19 months ago

On the other hand, since these errors only show if you are running WP_DEBUG, maybe it's time to just bump them all to E_WARNING, always? You're either willingly displaying errors, or willingly logging them.

Or, we remove the WP_DEBUG requirement, and always issue an E_NOTICE, even when WP_DEBUG is not set. Then, trigger E_WARNING in development builds, which everyone (WP_DEBUG or not) will see.

Initial patch implements the original suggested behavior.

comment:2 toscho19 months ago

  • Cc info@… added

comment:3 ocean9018 months ago

  • Cc ocean90 added

comment:4 rmccue18 months ago

+1 for always E_USER_WARNING regardless of version.

+0 for issuing without WP_DEBUG; it feels wrong to me to show developer-related errors when not in debug mode, but maybe we need it to force plugin developers to stop doing it wrong.

comment:5 ryan14 months ago

  • Milestone changed from 3.6 to Future Release

comment:6 nacin6 months ago

  • Component changed from Warnings/Notices to Bootstrap/Load
Note: See TracTickets for help on using tickets.