Skip to content

Commit

Permalink
Fix more PHP 8.1 deprecations, refs #10008
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jul 22, 2021
1 parent 10ae1d7 commit 47cf602
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Composer/Util/ErrorHandler.php
Expand Up @@ -52,6 +52,11 @@ public static function handle($level, $message, $file, $line)
}

if (self::$io) {
// ignore symfony/console deprecation warning
if (0 === strpos($message, 'Return type of Symfony\\Component\\Console\\Helper\\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator')) {
return true;
}

self::$io->writeError('<warning>Deprecation Notice: '.$message.' in '.$file.':'.$line.'</warning>');
if (self::$io->isVerbose()) {
self::$io->writeError('<warning>Stack trace:</warning>');
Expand Down

0 comments on commit 47cf602

Please sign in to comment.