minor vendor updates

This commit is contained in:
Andy Miller
2021-02-16 14:40:27 -07:00
parent a60b98932a
commit 609692a622
5 changed files with 160 additions and 62 deletions

65
composer.lock generated
View File

@@ -255,25 +255,26 @@
"packages-dev": [ "packages-dev": [
{ {
"name": "behat/gherkin", "name": "behat/gherkin",
"version": "v4.7.1", "version": "v4.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Behat/Gherkin.git", "url": "https://github.com/Behat/Gherkin.git",
"reference": "987bcdc3d29ba433e6bd4b1db4ae59737ba3dacd" "reference": "2391482cd003dfdc36b679b27e9f5326bd656acd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Behat/Gherkin/zipball/987bcdc3d29ba433e6bd4b1db4ae59737ba3dacd", "url": "https://api.github.com/repos/Behat/Gherkin/zipball/2391482cd003dfdc36b679b27e9f5326bd656acd",
"reference": "987bcdc3d29ba433e6bd4b1db4ae59737ba3dacd", "reference": "2391482cd003dfdc36b679b27e9f5326bd656acd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.6" "php": "~7.2|~8.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~5.7|~6|~7", "cucumber/cucumber": "dev-gherkin-16.0.0",
"symfony/phpunit-bridge": "~2.7|~3|~4", "phpunit/phpunit": "~8|~9",
"symfony/yaml": "~2.3|~3|~4" "symfony/phpunit-bridge": "~3|~4|~5",
"symfony/yaml": "~3|~4|~5"
}, },
"suggest": { "suggest": {
"symfony/yaml": "If you want to parse features, represented in YAML files" "symfony/yaml": "If you want to parse features, represented in YAML files"
@@ -312,9 +313,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/Behat/Gherkin/issues", "issues": "https://github.com/Behat/Gherkin/issues",
"source": "https://github.com/Behat/Gherkin/tree/v4.7.1" "source": "https://github.com/Behat/Gherkin/tree/v4.8.0"
}, },
"time": "2021-01-26T16:24:32+00:00" "time": "2021-02-04T12:44:21+00:00"
}, },
{ {
"name": "codeception/codeception", "name": "codeception/codeception",
@@ -2993,7 +2994,7 @@
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.22.0", "version": "v1.22.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
@@ -3052,7 +3053,7 @@
"portable" "portable"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0" "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1"
}, },
"funding": [ "funding": [
{ {
@@ -3072,16 +3073,16 @@
}, },
{ {
"name": "symfony/polyfill-intl-idn", "name": "symfony/polyfill-intl-idn",
"version": "v1.22.0", "version": "v1.22.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git", "url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44" "reference": "2d63434d922daf7da8dd863e7907e67ee3031483"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44", "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483",
"reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44", "reference": "2d63434d922daf7da8dd863e7907e67ee3031483",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3139,7 +3140,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.0" "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1"
}, },
"funding": [ "funding": [
{ {
@@ -3155,20 +3156,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-01-07T16:49:33+00:00" "time": "2021-01-22T09:19:47+00:00"
}, },
{ {
"name": "symfony/polyfill-intl-normalizer", "name": "symfony/polyfill-intl-normalizer",
"version": "v1.22.0", "version": "v1.22.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "6e971c891537eb617a00bb07a43d182a6915faba" "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba", "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248",
"reference": "6e971c891537eb617a00bb07a43d182a6915faba", "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3223,7 +3224,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.0" "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1"
}, },
"funding": [ "funding": [
{ {
@@ -3239,20 +3240,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-01-07T17:09:11+00:00" "time": "2021-01-22T09:19:47+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.22.0", "version": "v1.22.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" "reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", "reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3303,7 +3304,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0" "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1"
}, },
"funding": [ "funding": [
{ {
@@ -3319,11 +3320,11 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-01-07T16:49:33+00:00" "time": "2021-01-22T09:19:47+00:00"
}, },
{ {
"name": "symfony/polyfill-php80", "name": "symfony/polyfill-php80",
"version": "v1.22.0", "version": "v1.22.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php80.git", "url": "https://github.com/symfony/polyfill-php80.git",
@@ -3386,7 +3387,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.22.0" "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1"
}, },
"funding": [ "funding": [
{ {

View File

@@ -42,6 +42,8 @@ namespace Composer\Autoload;
*/ */
class ClassLoader class ClassLoader
{ {
private $vendorDir;
// PSR-4 // PSR-4
private $prefixLengthsPsr4 = array(); private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array(); private $prefixDirsPsr4 = array();
@@ -57,6 +59,13 @@ class ClassLoader
private $missingClasses = array(); private $missingClasses = array();
private $apcuPrefix; private $apcuPrefix;
private static $registeredLoaders = array();
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
public function getPrefixes() public function getPrefixes()
{ {
if (!empty($this->prefixesPsr0)) { if (!empty($this->prefixesPsr0)) {
@@ -300,6 +309,15 @@ class ClassLoader
public function register($prepend = false) public function register($prepend = false)
{ {
spl_autoload_register(array($this, 'loadClass'), true, $prepend); spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
//no-op
} elseif ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
} }
/** /**
@@ -308,6 +326,10 @@ class ClassLoader
public function unregister() public function unregister()
{ {
spl_autoload_unregister(array($this, 'loadClass')); spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
} }
/** /**
@@ -367,6 +389,16 @@ class ClassLoader
return $file; return $file;
} }
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
private function findFileWithExtension($class, $ext) private function findFileWithExtension($class, $ext)
{ {
// PSR-4 lookup // PSR-4 lookup

View File

@@ -12,6 +12,7 @@
namespace Composer; namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser; use Composer\Semver\VersionParser;
@@ -29,7 +30,7 @@ private static $installed = array (
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '5de805e3409611ee484267d47022e3ad93a9c2f0', 'reference' => 'a60b98932a912af1746fb62ea3d39cbeb6f44e25',
'name' => 'getgrav/grav-plugin-admin', 'name' => 'getgrav/grav-plugin-admin',
), ),
'versions' => 'versions' =>
@@ -41,7 +42,7 @@ private static $installed = array (
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '5de805e3409611ee484267d47022e3ad93a9c2f0', 'reference' => 'a60b98932a912af1746fb62ea3d39cbeb6f44e25',
), ),
'laminas/laminas-xml' => 'laminas/laminas-xml' =>
array ( array (
@@ -109,6 +110,8 @@ private static $installed = array (
), ),
), ),
); );
private static $canGetVendors;
private static $installedByVendor = array();
@@ -118,7 +121,17 @@ private static $installed = array (
public static function getInstalledPackages() public static function getInstalledPackages()
{ {
return array_keys(self::$installed['versions']); $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)));
} }
@@ -131,7 +144,13 @@ return array_keys(self::$installed['versions']);
public static function isInstalled($packageName) public static function isInstalled($packageName)
{ {
return isset(self::$installed['versions'][$packageName]); foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return true;
}
}
return false;
} }
@@ -166,42 +185,50 @@ return $provided->matches($constraint);
public static function getVersionRanges($packageName) public static function getVersionRanges($packageName)
{ {
if (!isset(self::$installed['versions'][$packageName])) { foreach (self::getInstalled() as $installed) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); if (!isset($installed['versions'][$packageName])) {
continue;
} }
$ranges = array(); $ranges = array();
if (isset(self::$installed['versions'][$packageName]['pretty_version'])) { if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = self::$installed['versions'][$packageName]['pretty_version']; $ranges[] = $installed['versions'][$packageName]['pretty_version'];
} }
if (array_key_exists('aliases', self::$installed['versions'][$packageName])) { if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']); $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
} }
if (array_key_exists('replaced', self::$installed['versions'][$packageName])) { if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']); $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
} }
if (array_key_exists('provided', self::$installed['versions'][$packageName])) { if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']); $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
} }
return implode(' || ', $ranges); return implode(' || ', $ranges);
} }
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getVersion($packageName) public static function getVersion($packageName)
{ {
if (!isset(self::$installed['versions'][$packageName])) { foreach (self::getInstalled() as $installed) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); if (!isset($installed['versions'][$packageName])) {
continue;
} }
if (!isset(self::$installed['versions'][$packageName]['version'])) { if (!isset($installed['versions'][$packageName]['version'])) {
return null; return null;
} }
return self::$installed['versions'][$packageName]['version']; return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
} }
@@ -210,15 +237,19 @@ return self::$installed['versions'][$packageName]['version'];
public static function getPrettyVersion($packageName) public static function getPrettyVersion($packageName)
{ {
if (!isset(self::$installed['versions'][$packageName])) { foreach (self::getInstalled() as $installed) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); if (!isset($installed['versions'][$packageName])) {
continue;
} }
if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) { if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null; return null;
} }
return self::$installed['versions'][$packageName]['pretty_version']; return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
} }
@@ -227,15 +258,19 @@ return self::$installed['versions'][$packageName]['pretty_version'];
public static function getReference($packageName) public static function getReference($packageName)
{ {
if (!isset(self::$installed['versions'][$packageName])) { foreach (self::getInstalled() as $installed) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); if (!isset($installed['versions'][$packageName])) {
continue;
} }
if (!isset(self::$installed['versions'][$packageName]['reference'])) { if (!isset($installed['versions'][$packageName]['reference'])) {
return null; return null;
} }
return self::$installed['versions'][$packageName]['reference']; return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
} }
@@ -244,7 +279,9 @@ return self::$installed['versions'][$packageName]['reference'];
public static function getRootPackage() public static function getRootPackage()
{ {
return self::$installed['root']; $installed = self::getInstalled();
return $installed[0]['root'];
} }
@@ -279,5 +316,33 @@ return self::$installed;
public static function reload($data) public static function reload($data)
{ {
self::$installed = $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;
} }
} }

View File

@@ -25,7 +25,7 @@ class ComposerAutoloaderInit14b786715d80b97050af9c30f5c07b7c
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit14b786715d80b97050af9c30f5c07b7c', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit14b786715d80b97050af9c30f5c07b7c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit14b786715d80b97050af9c30f5c07b7c', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit14b786715d80b97050af9c30f5c07b7c', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());

View File

@@ -6,7 +6,7 @@
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '5de805e3409611ee484267d47022e3ad93a9c2f0', 'reference' => 'a60b98932a912af1746fb62ea3d39cbeb6f44e25',
'name' => 'getgrav/grav-plugin-admin', 'name' => 'getgrav/grav-plugin-admin',
), ),
'versions' => 'versions' =>
@@ -18,7 +18,7 @@
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '5de805e3409611ee484267d47022e3ad93a9c2f0', 'reference' => 'a60b98932a912af1746fb62ea3d39cbeb6f44e25',
), ),
'laminas/laminas-xml' => 'laminas/laminas-xml' =>
array ( array (