Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Suppress E_DEPRECATED in vendor files
<?php
if (PHP_VERSION_ID >= 80100) {
set_error_handler(static function (int $errno, string $errstr, string $errfile) {
return $errno === E_DEPRECATED && str_contains($errfile, dirname(__DIR__) . '/vendor');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment