Skip to content

Instantly share code, notes, and snippets.

@koriym
Created November 14, 2021 13:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koriym/fa957cfdb265218e28563cbe814ffc99 to your computer and use it in GitHub Desktop.
Save koriym/fa957cfdb265218e28563cbe814ffc99 to your computer and use it in GitHub Desktop.
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