Allow passing null to $prettyVersion to handle gracefully cases where a version could not be parsed upstream, refs #10631
parent
146e036b58
commit
f1e3ba74ab
|
@ -659,15 +659,18 @@ class PlatformRepository extends ArrayRepository
|
|||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $prettyVersion
|
||||
* @param string|null $prettyVersion
|
||||
* @param string|null $description
|
||||
* @param string[] $replaces
|
||||
* @param string[] $provides
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addLibrary(string $name, string $prettyVersion, ?string $description = null, array $replaces = array(), array $provides = array()): void
|
||||
private function addLibrary(string $name, ?string $prettyVersion, ?string $description = null, array $replaces = array(), array $provides = array()): void
|
||||
{
|
||||
if (null === $prettyVersion) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
$version = $this->versionParser->normalize($prettyVersion);
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
|
|
Loading…
Reference in New Issue