One of the worst things you can do for preparing for PHP upgrades is to use ~E_DEPRECATED in your development environments. Turning off and ignoring deprecation messages causes a world of pain when upgrading.

@ramsey

Hard agree. But sometimes it's necessary to shut up noisy plugins (or core on PHP 8.1+) just while working on a problem, so I have a gist for that.

https://gist.github.com/webaware/6520892

Turn on WordPress' WP_DEBUG_LOG but without E_STRICT. Accompanying blog post: http://snippets.webaware.com.au/snippets/wordpress-wp_debug_log-without-e_strict/

Turn on WordPress' WP_DEBUG_LOG but without E_STRICT. Accompanying blog post: http://snippets.webaware.com.au/snippets/wordpress-wp_debug_log-without-e_strict/ - debug-log-not-strict.php

Gist
@webaware @ramsey deprecation notices on PHP 8.1+ are too noisy with some plugins right now, making it so difficult to properly debug sometimes. Thanks for the gist! I’ll give it a try
@squaredpx Just remember to deactivate it so that you can see your own plugin's deprecation notices! 🙂