1
0
Fork 0

port from main/2.1: ignore all Return type deprecation warnings from Symfony and Composer namespaces (47cf602f9e, 2be03f0d60)

pull/10346/head
David Zuelke 2021-12-09 02:30:25 +01:00
parent ed9e9e9f9a
commit ac9f4ac86d
1 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,12 @@ class ErrorHandler
} }
if (self::$io) { if (self::$io) {
// ignore symfony/* deprecation warnings about return types
// also ignore them from the Composer namespace, as 1.x won't get all that fixed anymore
if (preg_match('{^Return type of (Symfony|Composer)\\\\.*ReturnTypeWillChange}is', $message)) {
return true;
}
self::$io->writeError('<warning>Deprecation Notice: '.$message.' in '.$file.':'.$line.'</warning>'); self::$io->writeError('<warning>Deprecation Notice: '.$message.' in '.$file.':'.$line.'</warning>');
if (self::$io->isVerbose()) { if (self::$io->isVerbose()) {
self::$io->writeError('<warning>Stack trace:</warning>'); self::$io->writeError('<warning>Stack trace:</warning>');