Skip to content

Commit

Permalink
Retrieve root package info directly from Composer 2 APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean85 committed Feb 3, 2021
1 parent 6d9ae9a commit a1cfeec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/PrettyVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public static function getRootPackageName(): string

public static function getRootPackageVersion(): Version
{
return self::getVersion(self::getRootPackageName());
return new Version(
self::getRootPackageName(),
InstalledVersions::getRootPackage()['pretty_version'],
InstalledVersions::getRootPackage()['reference']
);
}
}

0 comments on commit a1cfeec

Please sign in to comment.