Lines Matching refs:packageName
91 * @param string $packageName
95 public static function isInstalled($packageName, $includeDevRequirements = true)
98 if (isset($installed['versions'][$packageName])) {
99 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
114 * @param string $packageName
118 public static function satisfies(VersionParser $parser, $packageName, $constraint)
121 $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
132 * @param string $packageName
135 public static function getVersionRanges($packageName)
138 if (!isset($installed['versions'][$packageName])) {
143 if (isset($installed['versions'][$packageName]['pretty_version'])) {
144 $ranges[] = $installed['versions'][$packageName]['pretty_version'];
146 if (array_key_exists('aliases', $installed['versions'][$packageName])) {
147 $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
149 if (array_key_exists('replaced', $installed['versions'][$packageName])) {
150 $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
152 if (array_key_exists('provided', $installed['versions'][$packageName])) {
153 $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
159 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
163 * @param string $packageName
166 public static function getVersion($packageName)
169 if (!isset($installed['versions'][$packageName])) {
173 if (!isset($installed['versions'][$packageName]['version'])) {
177 return $installed['versions'][$packageName]['version'];
180 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
184 * @param string $packageName
187 public static function getPrettyVersion($packageName)
190 if (!isset($installed['versions'][$packageName])) {
194 if (!isset($installed['versions'][$packageName]['pretty_version'])) {
198 return $installed['versions'][$packageName]['pretty_version'];
201 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
205 * @param string $packageName
208 public static function getReference($packageName)
211 if (!isset($installed['versions'][$packageName])) {
215 if (!isset($installed['versions'][$packageName]['reference'])) {
219 return $installed['versions'][$packageName]['reference'];
222 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
226 * @param string $packageName
229 public static function getInstallPath($packageName)
232 if (!isset($installed['versions'][$packageName])) {
236 return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
239 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');