rebase on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:23:21 -04:00
parent d37566ffb6
commit d096058d7d
4789 changed files with 254611 additions and 307223 deletions

View File

@@ -42,9 +42,6 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var ?string */
private $vendorDir;
@@ -109,7 +106,6 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
@@ -429,8 +425,7 @@ class ClassLoader
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile;
$includeFile($file);
includeFile($file);
return true;
}
@@ -560,26 +555,18 @@ class ClassLoader
return false;
}
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
include $file;
}

View File

@@ -98,7 +98,7 @@ class InstalledVersions
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
}
}
@@ -119,7 +119,7 @@ class InstalledVersions
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints((string) $constraint);
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
@@ -266,7 +266,7 @@ class InstalledVersions
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
@@ -328,9 +328,7 @@ class InstalledVersions
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
@@ -341,18 +339,13 @@ class InstalledVersions
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
if (self::$installed !== array()) {
$installed[] = self::$installed;
}
$installed[] = self::$installed;
return $installed;
}

View File

@@ -1,3 +1,4 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -17,3 +18,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitcde6fa94c4ead1caee24c8618befe0aa
class ComposerAutoloaderInit694d9e7793fc464707a263b7aca54811
{
private static $loader;
@@ -22,27 +22,34 @@ class ComposerAutoloaderInitcde6fa94c4ead1caee24c8618befe0aa
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitcde6fa94c4ead1caee24c8618befe0aa', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit694d9e7793fc464707a263b7aca54811', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitcde6fa94c4ead1caee24c8618befe0aa', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit694d9e7793fc464707a263b7aca54811', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitcde6fa94c4ead1caee24c8618befe0aa::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit694d9e7793fc464707a263b7aca54811::getInitializer($loader));
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitcde6fa94c4ead1caee24c8618befe0aa::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
$includeFiles = \Composer\Autoload\ComposerStaticInit694d9e7793fc464707a263b7aca54811::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire694d9e7793fc464707a263b7aca54811($fileIdentifier, $file);
}
return $loader;
}
}
/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequire694d9e7793fc464707a263b7aca54811($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}

View File

@@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitcde6fa94c4ead1caee24c8618befe0aa
class ComposerStaticInit694d9e7793fc464707a263b7aca54811
{
public static $files = array (
'fcd5d7d87e03ff4f5b5a66c2b8968671' => __DIR__ . '/../..' . '/src/StoreApi/deprecated.php',
@@ -51,9 +51,9 @@ class ComposerStaticInitcde6fa94c4ead1caee24c8618befe0aa
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitcde6fa94c4ead1caee24c8618befe0aa::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitcde6fa94c4ead1caee24c8618befe0aa::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitcde6fa94c4ead1caee24c8618befe0aa::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit694d9e7793fc464707a263b7aca54811::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit694d9e7793fc464707a263b7aca54811::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit694d9e7793fc464707a263b7aca54811::$classMap;
}, null, ClassLoader::class);
}

View File

@@ -2,27 +2,27 @@
"packages": [
{
"name": "automattic/jetpack-autoloader",
"version": "v2.11.16",
"version_normalized": "2.11.16.0",
"version": "v2.11.21",
"version_normalized": "2.11.21.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-autoloader.git",
"reference": "43bc969fd90ce3d92e7b75fbf384a5fd03963dad"
"reference": "3a01a4a4ac166eaa721438cc06daa3cca0d51a15"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/43bc969fd90ce3d92e7b75fbf384a5fd03963dad",
"reference": "43bc969fd90ce3d92e7b75fbf384a5fd03963dad",
"url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/3a01a4a4ac166eaa721438cc06daa3cca0d51a15",
"reference": "3a01a4a4ac166eaa721438cc06daa3cca0d51a15",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.1 || ^2.0"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.2",
"automattic/jetpack-changelogger": "^3.3.4",
"yoast/phpunit-polyfills": "1.0.4"
},
"time": "2023-02-20T19:47:16+00:00",
"time": "2023-05-22T14:27:35+00:00",
"type": "composer-plugin",
"extra": {
"autotagger": true,
@@ -49,8 +49,16 @@
"GPL-2.0-or-later"
],
"description": "Creates a custom autoloader for a plugin or theme.",
"keywords": [
"autoload",
"autoloader",
"composer",
"jetpack",
"plugin",
"wordpress"
],
"support": {
"source": "https://github.com/Automattic/jetpack-autoloader/tree/v2.11.16"
"source": "https://github.com/Automattic/jetpack-autoloader/tree/v2.11.21"
},
"install-path": "../automattic/jetpack-autoloader"
},

View File

@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'woocommerce/woocommerce-blocks',
'pretty_version' => '10.0.6',
'version' => '10.0.6.0',
'pretty_version' => '10.9.3',
'version' => '10.9.3.0',
'reference' => NULL,
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
@@ -11,9 +11,9 @@
),
'versions' => array(
'automattic/jetpack-autoloader' => array(
'pretty_version' => 'v2.11.16',
'version' => '2.11.16.0',
'reference' => '43bc969fd90ce3d92e7b75fbf384a5fd03963dad',
'pretty_version' => 'v2.11.21',
'version' => '2.11.21.0',
'reference' => '3a01a4a4ac166eaa721438cc06daa3cca0d51a15',
'type' => 'composer-plugin',
'install_path' => __DIR__ . '/../automattic/jetpack-autoloader',
'aliases' => array(),
@@ -41,8 +41,8 @@
),
),
'woocommerce/woocommerce-blocks' => array(
'pretty_version' => '10.0.6',
'version' => '10.0.6.0',
'pretty_version' => '10.9.3',
'version' => '10.9.3.0',
'reference' => NULL,
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',

View File

@@ -7,7 +7,7 @@ $baseDir = dirname($vendorDir);
return array(
'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array(
'version' => '2.11.16.0',
'version' => '2.11.21.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php'
),
);

View File

@@ -7,11 +7,11 @@ $baseDir = dirname($vendorDir);
return array(
'fcd5d7d87e03ff4f5b5a66c2b8968671' => array(
'version' => '10.0.6.0',
'version' => '10.9.3.0',
'path' => $baseDir . '/src/StoreApi/deprecated.php'
),
'd0f16a186498c2ba04f1d0064fecf9cf' => array(
'version' => '10.0.6.0',
'version' => '10.9.3.0',
'path' => $baseDir . '/src/StoreApi/functions.php'
),
);

View File

@@ -11,19 +11,19 @@ return array(
'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
),
'Automattic\\WooCommerce\\StoreApi\\' => array(
'version' => '10.0.6.0',
'version' => '10.9.3.0',
'path' => array( $baseDir . '/src/StoreApi' )
),
'Automattic\\WooCommerce\\Blocks\\Tests\\' => array(
'version' => '10.0.6.0',
'version' => '10.9.3.0',
'path' => array( $baseDir . '/tests/php' )
),
'Automattic\\WooCommerce\\Blocks\\' => array(
'version' => '10.0.6.0',
'version' => '10.9.3.0',
'path' => array( $baseDir . '/src' )
),
'Automattic\\Jetpack\\Autoloader\\' => array(
'version' => '2.11.16.0',
'version' => '2.11.21.0',
'path' => array( $vendorDir . '/automattic/jetpack-autoloader/src' )
),
);