Created
November 14, 2021 13:19
-
-
Save koriym/fa957cfdb265218e28563cbe814ffc99 to your computer and use it in GitHub Desktop.
Suppress E_DEPRECATED in vendor files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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