Deprecation warnings say, that it potentially may not be ready for 8.4.2 or 8.4.3 or any other further version. But in my understanding, it is ready for PHP 8.4.0 and 8.4.1. 🙂
If the deprecation warnings bother you, you can disable showing only those messages with a call of PHPs set_error_handler():
/** OWN ERROR HANDLER FOR DEPRECATION NOTES ************************************/
function myLocalDevDeprecationErrorHandler($errno, $errstr, $errfile, $errline) {
return true; // true | false = suppress further processing
}
// preceed the callback function name with the PW namespace,
// and define the error types that should passed to the function
set_error_handler('ProcessWire\myLocalDevDeprecationErrorHandler', E_DEPRECATED);
/** OWN ERROR HANDLER FOR DEPRECATION NOTES ************************************/
I often use this directly in site/config-dev.php, when I want to collect them, but only show them collected at the end of pages in dev local.
/** OWN ERROR HANDLER FOR DEPRECATION NOTES ************************************/
function myLocalDevDeprecationErrorHandler($errno, $errstr, $errfile, $errline) {
// CHECK / CREATE COLLECTION CONTAINER
if (!isset($GLOBALS['DEPRECATION_WARNINGS_BAG'])) {
$GLOBALS['DEPRECATION_WARNINGS_BAG'] = [];
}
if (!is_array($GLOBALS['DEPRECATION_WARNINGS_BAG'])) {
$GLOBALS['DEPRECATION_WARNINGS_BAG'] = [];
}
// DO NOT SHOW THIS KNOWN THIRD PARTY ONES :
$hideThisOnes = [
//'FileCompiler',
'Duplicator',
'ProcessCustomUploadNames',
];
foreach($hideThisOnes as $item) {
if (preg_match("/{$item}/", $errfile)) return true;
}
// ADD IT TO THE COLLECTION
$GLOBALS['DEPRECATION_WARNINGS_BAG'][] = [$errfile, $errline, $errstr];
return true; // true | false = suppress further processing
}
// preceed the callback function name with the PW namespace,
// and define the error types that should passed to the function
set_error_handler('ProcessWire\myLocalDevDeprecationErrorHandler', E_DEPRECATED);
/** OWN ERROR HANDLER FOR DEPRECATION NOTES ************************************/