Skip to content

Commit

Permalink
fix php8.1 error composer#10696
Browse files Browse the repository at this point in the history
  • Loading branch information
it-can committed Apr 4, 2022
1 parent b03e9e4 commit d3851d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Composer/Command/SelfUpdateCommand.php
Expand Up @@ -212,7 +212,7 @@ class_exists('Composer\Downloader\FilesystemException');

// remove all backups except for the most recent, if any
if ($input->getOption('clean-backups')) {
$this->cleanBackups($rollbackDir, $this->getLastBackupVersion($rollbackDir));
$this->cleanBackups($rollbackDir);
}

return 0;
Expand Down Expand Up @@ -484,12 +484,12 @@ protected function setLocalPhar(string $localFilename, string $newFilename, stri

/**
* @param string $rollbackDir
* @param string|null $except
*
* @return void
*/
protected function cleanBackups(string $rollbackDir, ?string $except = null): void
protected function cleanBackups(string $rollbackDir): void
{
$except = $this->getLastBackupVersion($rollbackDir);
$finder = $this->getOldInstallationFinder($rollbackDir);
$io = $this->getIO();
$fs = new Filesystem;
Expand Down

0 comments on commit d3851d7

Please sign in to comment.