InstalledVersions::getPrettyVersion( string $packageName )
Contents
Parameters Parameters
- $packageName
-
(string) (Required)
Return Return
(string|null) If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
Source Source
File: libraries/lifterlms-cli/vendor/composer/InstalledVersions.php
public static function getPrettyVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['pretty_version'])) { return null; } return $installed['versions'][$packageName]['pretty_version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); }
Expand full source code Collapse full source code View on GitHub