1
0
Fork 0

Remove getCode usage as it is not type safe apparently, see https://github.com/phpstan/phpstan-src/pull/795

pull/10409/head
Jordi Boggiano 2021-12-30 21:06:27 +01:00
parent 09d1330937
commit 84f8fda0c6
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 11 additions and 3 deletions

View File

@ -39,6 +39,14 @@ class SolverProblemsException extends \RuntimeException
parent::__construct('Failed resolving dependencies with '.count($problems).' problems, call getPrettyString to get formatted details', self::ERROR_DEPENDENCY_RESOLUTION_FAILED); parent::__construct('Failed resolving dependencies with '.count($problems).' problems, call getPrettyString to get formatted details', self::ERROR_DEPENDENCY_RESOLUTION_FAILED);
} }
/**
* @return self::ERROR_DEPENDENCY_RESOLUTION_FAILED
*/
public function getExitCode()
{
return self::ERROR_DEPENDENCY_RESOLUTION_FAILED;
}
/** /**
* @param bool $isVerbose * @param bool $isVerbose
* @param bool $isDevExtraction * @param bool $isDevExtraction

View File

@ -455,7 +455,7 @@ class Installer
$ghe = new GithubActionError($this->io); $ghe = new GithubActionError($this->io);
$ghe->emit($err."\n".$prettyProblem); $ghe->emit($err."\n".$prettyProblem);
return max(self::ERROR_GENERIC_FAILURE, $e->getCode()); return max(self::ERROR_GENERIC_FAILURE, $e->getExitCode());
} }
$this->io->writeError("Analyzed ".count($pool)." packages to resolve dependencies", true, IOInterface::VERBOSE); $this->io->writeError("Analyzed ".count($pool)." packages to resolve dependencies", true, IOInterface::VERBOSE);
@ -633,7 +633,7 @@ class Installer
$ghe = new GithubActionError($this->io); $ghe = new GithubActionError($this->io);
$ghe->emit($err."\n".$prettyProblem); $ghe->emit($err."\n".$prettyProblem);
return max(self::ERROR_GENERIC_FAILURE, $e->getCode()); return max(self::ERROR_GENERIC_FAILURE, $e->getExitCode());
} }
$lockTransaction->setNonDevPackages($nonDevLockTransaction); $lockTransaction->setNonDevPackages($nonDevLockTransaction);
@ -703,7 +703,7 @@ class Installer
$ghe = new GithubActionError($this->io); $ghe = new GithubActionError($this->io);
$ghe->emit($err."\n".$prettyProblem); $ghe->emit($err."\n".$prettyProblem);
return max(self::ERROR_GENERIC_FAILURE, $e->getCode()); return max(self::ERROR_GENERIC_FAILURE, $e->getExitCode());
} }
} }