diff --git a/src/Composer/Package/Version/VersionGuesser.php b/src/Composer/Package/Version/VersionGuesser.php index bda0f7ec6..9aca9ca53 100644 --- a/src/Composer/Package/Version/VersionGuesser.php +++ b/src/Composer/Package/Version/VersionGuesser.php @@ -179,7 +179,7 @@ class VersionGuesser } if (!$isFeatureBranch) { - return $version; + return array('version' => $version, 'commit' => null, 'pretty_version' => $version); } // re-use the HgDriver to fetch branches (this properly includes bookmarks) diff --git a/tests/Composer/Test/Package/Version/VersionGuesserTest.php b/tests/Composer/Test/Package/Version/VersionGuesserTest.php index b3af71cc9..52488dacc 100644 --- a/tests/Composer/Test/Package/Version/VersionGuesserTest.php +++ b/tests/Composer/Test/Package/Version/VersionGuesserTest.php @@ -88,7 +88,7 @@ class VersionGuesserTest extends \PHPUnit_Framework_TestCase $guesser = new VersionGuesser($config, $executor, new VersionParser()); $versionArray = $guesser->guessVersion(array(), 'dummy/path'); - $this->assertEquals($branch, $versionArray['version']); + $this->assertEquals('dev-' . $branch, $versionArray['version']); $this->assertEmpty($versionArray['commit']); }