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 $name
|
||||||
* @param string $prettyVersion
|
* @param string|null $prettyVersion
|
||||||
* @param string|null $description
|
* @param string|null $description
|
||||||
* @param string[] $replaces
|
* @param string[] $replaces
|
||||||
* @param string[] $provides
|
* @param string[] $provides
|
||||||
*
|
*
|
||||||
* @return void
|
* @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 {
|
try {
|
||||||
$version = $this->versionParser->normalize($prettyVersion);
|
$version = $this->versionParser->normalize($prettyVersion);
|
||||||
} catch (\UnexpectedValueException $e) {
|
} catch (\UnexpectedValueException $e) {
|
||||||
|
|
Loading…
Reference in New Issue