You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error after a fresh install on my mac machine with php8.1, I run this command
composer self-update --clean-backups
You are already using the latest available Composer version 2.3.3 (stable channel).
In SelfUpdateCommand.php line 491:
[TypeError]
Composer\Command\SelfUpdateCommand::cleanBackups(): Argument #2 ($except) must be of type
?string, bool given, called in phar:///usr/local/bin/composer/src/Composer/Command/SelfU
pdateCommand.php on line 215
Exception trace:
at phar:///usr/local/bin/composer/src/Composer/Command/SelfUpdateCommand.php:491
Composer\Command\SelfUpdateCommand->cleanBackups() at phar:///usr/local/bin/composer/src/Composer/Command/SelfUpdateCommand.php:215
Composer\Command\SelfUpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1015
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:299
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:334
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:130
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:83
require() at /usr/local/bin/composer:29
I get this error after a fresh install on my mac machine with php8.1, I run this command
The problem is caused by this function
composer/src/Composer/Command/SelfUpdateCommand.php
Line 491 in dce63fd
cleanBackups(string $rollbackDir, ?string $except = null): void
$except
is excpected to be a string, but a boolean will be passed if there are no backup files available... See functiongetLastBackupVersion
composer/src/Composer/Command/SelfUpdateCommand.php
Line 511 in dce63fd
This function will return
false
when there are no old backups...I created a PR #10704
The text was updated successfully, but these errors were encountered: