Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bin/composer
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ use Composer\XdebugHandler\XdebugHandler;
use Composer\Util\Platform;
use Composer\Util\ErrorHandler;

error_reporting(-1);
// no E_DEPRECATED for this LTS series, or we get countless deprecation notices related to E_STRICT and explicit nullable types for PHP 8.4+
// also see ErrorHandler::register()
error_reporting(E_ALL & ~E_DEPRECATED);

// Restart without Xdebug
$xdebug = new XdebugHandler('Composer');
Expand Down
4 changes: 3 additions & 1 deletion src/Composer/Util/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public static function handle($level, $message, $file, $line)
public static function register(IOInterface $io = null)
{
set_error_handler(array(__CLASS__, 'handle'));
error_reporting(E_ALL | E_STRICT);
// no E_DEPRECATED for this LTS series, or we get countless deprecation notices related to E_STRICT and explicit nullable types for PHP 8.4+
// also see bin/composer
error_reporting(E_ALL & ~E_DEPRECATED | E_STRICT);
self::$io = $io;
}
}
Loading