aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/composer/InstalledVersions.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/composer/InstalledVersions.php')
-rw-r--r--vendor/composer/InstalledVersions.php171
1 files changed, 53 insertions, 118 deletions
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
index e597e0eb3..0e6b84d2a 100644
--- a/vendor/composer/InstalledVersions.php
+++ b/vendor/composer/InstalledVersions.php
@@ -12,7 +12,6 @@
namespace Composer;
-use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
@@ -25,12 +24,12 @@ class InstalledVersions
private static $installed = array (
'root' =>
array (
- 'pretty_version' => 'dev-5.2RC',
- 'version' => 'dev-5.2RC',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
'aliases' =>
array (
),
- 'reference' => 'a6162d3134cd7fcde4f45064b75f90008a7f8177',
+ 'reference' => '6fae291cc8ec69a74d0c1673186b3d8f319378d4',
'name' => 'zotlabs/hubzilla',
),
'versions' =>
@@ -46,12 +45,12 @@ private static $installed = array (
),
'brick/math' =>
array (
- 'pretty_version' => '0.9.1',
- 'version' => '0.9.1.0',
+ 'pretty_version' => '0.9.2',
+ 'version' => '0.9.2.0',
'aliases' =>
array (
),
- 'reference' => '283a40c901101e66de7061bd359252c013dcc43c',
+ 'reference' => 'dff976c2f3487d42c1db75a3b180e2b9f0e72ce0',
),
'bshaffer/oauth2-server-php' =>
array (
@@ -145,12 +144,12 @@ private static $installed = array (
),
'ramsey/collection' =>
array (
- 'pretty_version' => '1.1.1',
- 'version' => '1.1.1.0',
+ 'pretty_version' => '1.1.3',
+ 'version' => '1.1.3.0',
'aliases' =>
array (
),
- 'reference' => '24d93aefb2cd786b7edd9f45b554aea20b28b9b1',
+ 'reference' => '28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1',
),
'ramsey/uuid' =>
array (
@@ -170,12 +169,12 @@ private static $installed = array (
),
'sabre/dav' =>
array (
- 'pretty_version' => '4.1.3',
- 'version' => '4.1.3.0',
+ 'pretty_version' => '4.1.5',
+ 'version' => '4.1.5.0',
'aliases' =>
array (
),
- 'reference' => 'b903eeedfbdcd6cab7935661ec6dc2d90cdf8a1e',
+ 'reference' => 'c1afdc77a95efea6ee40c03c45f57c3c0c80ec22',
),
'sabre/event' =>
array (
@@ -206,12 +205,12 @@ private static $installed = array (
),
'sabre/vobject' =>
array (
- 'pretty_version' => '4.3.3',
- 'version' => '4.3.3.0',
+ 'pretty_version' => '4.3.5',
+ 'version' => '4.3.5.0',
'aliases' =>
array (
),
- 'reference' => '58f9f9b46a1080c0130bd86f4df9a568aacb9c79',
+ 'reference' => 'd8a0a9ae215a8acfb51afc29101c7344670b9c83',
),
'sabre/xml' =>
array (
@@ -233,51 +232,49 @@ private static $installed = array (
),
'smarty/smarty' =>
array (
- 'pretty_version' => 'v3.1.36',
- 'version' => '3.1.36.0',
+ 'pretty_version' => 'v3.1.38',
+ 'version' => '3.1.38.0',
'aliases' =>
array (
),
- 'reference' => 'fd148f7ade295014fff77f89ee3d5b20d9d55451',
+ 'reference' => '63b3c0aed0f614880cda21a5c08c606e97b489bb',
),
'symfony/polyfill-ctype' =>
array (
- 'pretty_version' => 'v1.20.0',
- 'version' => '1.20.0.0',
+ 'pretty_version' => 'v1.22.0',
+ 'version' => '1.22.0.0',
'aliases' =>
array (
),
- 'reference' => 'f4ba089a5b6366e453971d3aad5fe8e897b37f41',
+ 'reference' => 'c6c942b1ac76c82448322025e084cadc56048b4e',
),
'twbs/bootstrap' =>
array (
- 'pretty_version' => 'v4.5.3',
- 'version' => '4.5.3.0',
+ 'pretty_version' => 'v4.6.0',
+ 'version' => '4.6.0.0',
'aliases' =>
array (
),
- 'reference' => 'a716fb03f965dc0846df479e14388b1b4b93d7ce',
+ 'reference' => '6ffb0b48e455430f8a5359ed689ad64c1143fac2',
),
'twitter/bootstrap' =>
array (
'replaced' =>
array (
- 0 => 'v4.5.3',
+ 0 => 'v4.6.0',
),
),
'zotlabs/hubzilla' =>
array (
- 'pretty_version' => 'dev-5.2RC',
- 'version' => 'dev-5.2RC',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
'aliases' =>
array (
),
- 'reference' => 'a6162d3134cd7fcde4f45064b75f90008a7f8177',
+ 'reference' => '6fae291cc8ec69a74d0c1673186b3d8f319378d4',
),
),
);
-private static $canGetVendors;
-private static $installedByVendor = array();
@@ -287,17 +284,7 @@ private static $installedByVendor = array();
public static function getInstalledPackages()
{
-$packages = array();
-foreach (self::getInstalled() as $installed) {
-$packages[] = array_keys($installed['versions']);
-}
-
-
-if (1 === \count($packages)) {
-return $packages[0];
-}
-
-return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+return array_keys(self::$installed['versions']);
}
@@ -310,13 +297,7 @@ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
public static function isInstalled($packageName)
{
-foreach (self::getInstalled() as $installed) {
-if (isset($installed['versions'][$packageName])) {
-return true;
-}
-}
-
-return false;
+return isset(self::$installed['versions'][$packageName]);
}
@@ -351,50 +332,42 @@ return $provided->matches($constraint);
public static function getVersionRanges($packageName)
{
-foreach (self::getInstalled() as $installed) {
-if (!isset($installed['versions'][$packageName])) {
-continue;
+if (!isset(self::$installed['versions'][$packageName])) {
+throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
$ranges = array();
-if (isset($installed['versions'][$packageName]['pretty_version'])) {
-$ranges[] = $installed['versions'][$packageName]['pretty_version'];
+if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
+$ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
}
-if (array_key_exists('aliases', $installed['versions'][$packageName])) {
-$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
+$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
}
-if (array_key_exists('replaced', $installed['versions'][$packageName])) {
-$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
+$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
}
-if (array_key_exists('provided', $installed['versions'][$packageName])) {
-$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
+$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
-throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
-}
-
public static function getVersion($packageName)
{
-foreach (self::getInstalled() as $installed) {
-if (!isset($installed['versions'][$packageName])) {
-continue;
+if (!isset(self::$installed['versions'][$packageName])) {
+throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
-if (!isset($installed['versions'][$packageName]['version'])) {
+if (!isset(self::$installed['versions'][$packageName]['version'])) {
return null;
}
-return $installed['versions'][$packageName]['version'];
-}
-
-throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+return self::$installed['versions'][$packageName]['version'];
}
@@ -403,19 +376,15 @@ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed
public static function getPrettyVersion($packageName)
{
-foreach (self::getInstalled() as $installed) {
-if (!isset($installed['versions'][$packageName])) {
-continue;
+if (!isset(self::$installed['versions'][$packageName])) {
+throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
-if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
return null;
}
-return $installed['versions'][$packageName]['pretty_version'];
-}
-
-throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+return self::$installed['versions'][$packageName]['pretty_version'];
}
@@ -424,19 +393,15 @@ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed
public static function getReference($packageName)
{
-foreach (self::getInstalled() as $installed) {
-if (!isset($installed['versions'][$packageName])) {
-continue;
+if (!isset(self::$installed['versions'][$packageName])) {
+throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
-if (!isset($installed['versions'][$packageName]['reference'])) {
+if (!isset(self::$installed['versions'][$packageName]['reference'])) {
return null;
}
-return $installed['versions'][$packageName]['reference'];
-}
-
-throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+return self::$installed['versions'][$packageName]['reference'];
}
@@ -445,9 +410,7 @@ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed
public static function getRootPackage()
{
-$installed = self::getInstalled();
-
-return $installed[0]['root'];
+return self::$installed['root'];
}
@@ -482,33 +445,5 @@ return self::$installed;
public static function reload($data)
{
self::$installed = $data;
-self::$installedByVendor = array();
-}
-
-
-
-
-private static function getInstalled()
-{
-if (null === self::$canGetVendors) {
-self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
-}
-
-$installed = array();
-
-if (self::$canGetVendors) {
-
-foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
-if (isset(self::$installedByVendor[$vendorDir])) {
-$installed[] = self::$installedByVendor[$vendorDir];
-} elseif (is_file($vendorDir.'/composer/installed.php')) {
-$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
-}
-}
-}
-
-$installed[] = self::$installed;
-
-return $installed;
}
}