getPackageVersion() public static method

Get the package version of the given package Return normalized package version.
See also: https://getcomposer.org/doc/04-schema.md#version
public static getPackageVersion ( string $composerName ) : string
$composerName string
return string
 /**
  * Get the installed package version (from composer) and as fallback the version given by composer manifest.
  *
  * @return string
  * @api
  */
 public function getInstalledVersion()
 {
     return PackageManager::getPackageVersion($this->composerName) ?: $this->getComposerManifest('version');
 }