From be1ddcf29356cea48c87ff8a8d670311f3d78a38 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 13 Apr 2020 12:48:43 +0200 Subject: [PATCH] Fix handling of svn trunk in version guesser, fixes #8765 --- src/Composer/Package/Version/VersionGuesser.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Composer/Package/Version/VersionGuesser.php b/src/Composer/Package/Version/VersionGuesser.php index c86396ca2..353ad00fb 100644 --- a/src/Composer/Package/Version/VersionGuesser.php +++ b/src/Composer/Package/Version/VersionGuesser.php @@ -89,7 +89,7 @@ class VersionGuesser if (null !== $versionData && null !== $versionData['version']) { return $this->postprocess($versionData); } - + return null; } @@ -321,7 +321,11 @@ class VersionGuesser } $prettyVersion = trim($matches[1]); - $version = $this->versionParser->normalize($prettyVersion); + if ($prettyVersion === 'trunk') { + $version = 'dev-trunk'; + } else { + $version = $this->versionParser->normalize($prettyVersion); + } return array('version' => $version, 'commit' => '', 'pretty_version' => $prettyVersion); }