Skip to content

Commit

Permalink
Update composer deps
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed May 25, 2023
1 parent 652ded2 commit 2030a2d
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 47 deletions.
41 changes: 27 additions & 14 deletions vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;

/** @var ?string */
private $vendorDir;

Expand Down Expand Up @@ -106,6 +109,7 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}

/**
Expand Down Expand Up @@ -425,7 +429,8 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
$includeFile = self::$includeFile;
$includeFile($file);

return true;
}
Expand Down Expand Up @@ -555,18 +560,26 @@ private function findFileWithExtension($class, $ext)

return false;
}
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
include $file;
/**
* @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);
}
}
17 changes: 5 additions & 12 deletions vendor/composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
{
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']);
}
}

Expand All @@ -119,7 +119,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
*/
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);
Expand Down Expand Up @@ -328,9 +328,7 @@ private static function getInstalled()
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];
}
Expand All @@ -342,17 +340,12 @@ private static function getInstalled()
// 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') {
/** @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;
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}

if (self::$installed !== array()) {
$installed[] = self::$installed;
}
$installed[] = self::$installed;

return $installed;
}
Expand Down
10 changes: 10 additions & 0 deletions vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
'Kirby\\Cms\\LanguageRouter' => $baseDir . '/src/Cms/LanguageRouter.php',
'Kirby\\Cms\\LanguageRoutes' => $baseDir . '/src/Cms/LanguageRoutes.php',
'Kirby\\Cms\\LanguageRules' => $baseDir . '/src/Cms/LanguageRules.php',
'Kirby\\Cms\\LanguageVariable' => $baseDir . '/src/Cms/LanguageVariable.php',
'Kirby\\Cms\\Languages' => $baseDir . '/src/Cms/Languages.php',
'Kirby\\Cms\\Layout' => $baseDir . '/src/Cms/Layout.php',
'Kirby\\Cms\\LayoutColumn' => $baseDir . '/src/Cms/LayoutColumn.php',
Expand Down Expand Up @@ -143,6 +144,10 @@
'Kirby\\Cms\\UserRules' => $baseDir . '/src/Cms/UserRules.php',
'Kirby\\Cms\\Users' => $baseDir . '/src/Cms/Users.php',
'Kirby\\Cms\\Visitor' => $baseDir . '/src/Cms/Visitor.php',
'Kirby\\ComposerInstaller\\CmsInstaller' => $vendorDir . '/getkirby/composer-installer/src/ComposerInstaller/CmsInstaller.php',
'Kirby\\ComposerInstaller\\Installer' => $vendorDir . '/getkirby/composer-installer/src/ComposerInstaller/Installer.php',
'Kirby\\ComposerInstaller\\Plugin' => $vendorDir . '/getkirby/composer-installer/src/ComposerInstaller/Plugin.php',
'Kirby\\ComposerInstaller\\PluginInstaller' => $vendorDir . '/getkirby/composer-installer/src/ComposerInstaller/PluginInstaller.php',
'Kirby\\Data\\Data' => $baseDir . '/src/Data/Data.php',
'Kirby\\Data\\Handler' => $baseDir . '/src/Data/Handler.php',
'Kirby\\Data\\Json' => $baseDir . '/src/Data/Json.php',
Expand All @@ -161,6 +166,7 @@
'Kirby\\Email\\Body' => $baseDir . '/src/Email/Body.php',
'Kirby\\Email\\Email' => $baseDir . '/src/Email/Email.php',
'Kirby\\Email\\PHPMailer' => $baseDir . '/src/Email/PHPMailer.php',
'Kirby\\Exception\\AuthException' => $baseDir . '/src/Exception/AuthException.php',
'Kirby\\Exception\\BadMethodCallException' => $baseDir . '/src/Exception/BadMethodCallException.php',
'Kirby\\Exception\\DuplicateException' => $baseDir . '/src/Exception/DuplicateException.php',
'Kirby\\Exception\\ErrorPageException' => $baseDir . '/src/Exception/ErrorPageException.php',
Expand Down Expand Up @@ -217,22 +223,26 @@
'Kirby\\Image\\Darkroom\\ImageMagick' => $baseDir . '/src/Image/Darkroom/ImageMagick.php',
'Kirby\\Image\\Dimensions' => $baseDir . '/src/Image/Dimensions.php',
'Kirby\\Image\\Exif' => $baseDir . '/src/Image/Exif.php',
'Kirby\\Image\\Focus' => $baseDir . '/src/Image/Focus.php',
'Kirby\\Image\\Image' => $baseDir . '/src/Image/Image.php',
'Kirby\\Image\\Location' => $baseDir . '/src/Image/Location.php',
'Kirby\\Option\\Option' => $baseDir . '/src/Option/Option.php',
'Kirby\\Option\\Options' => $baseDir . '/src/Option/Options.php',
'Kirby\\Option\\OptionsApi' => $baseDir . '/src/Option/OptionsApi.php',
'Kirby\\Option\\OptionsProvider' => $baseDir . '/src/Option/OptionsProvider.php',
'Kirby\\Option\\OptionsQuery' => $baseDir . '/src/Option/OptionsQuery.php',
'Kirby\\Panel\\Assets' => $baseDir . '/src/Panel/Assets.php',
'Kirby\\Panel\\Dialog' => $baseDir . '/src/Panel/Dialog.php',
'Kirby\\Panel\\Document' => $baseDir . '/src/Panel/Document.php',
'Kirby\\Panel\\Drawer' => $baseDir . '/src/Panel/Drawer.php',
'Kirby\\Panel\\Dropdown' => $baseDir . '/src/Panel/Dropdown.php',
'Kirby\\Panel\\Field' => $baseDir . '/src/Panel/Field.php',
'Kirby\\Panel\\File' => $baseDir . '/src/Panel/File.php',
'Kirby\\Panel\\Home' => $baseDir . '/src/Panel/Home.php',
'Kirby\\Panel\\Json' => $baseDir . '/src/Panel/Json.php',
'Kirby\\Panel\\Model' => $baseDir . '/src/Panel/Model.php',
'Kirby\\Panel\\Page' => $baseDir . '/src/Panel/Page.php',
'Kirby\\Panel\\PageCreateDialog' => $baseDir . '/src/Panel/PageCreateDialog.php',
'Kirby\\Panel\\Panel' => $baseDir . '/src/Panel/Panel.php',
'Kirby\\Panel\\Plugins' => $baseDir . '/src/Panel/Plugins.php',
'Kirby\\Panel\\Redirect' => $baseDir . '/src/Panel/Redirect.php',
Expand Down
27 changes: 10 additions & 17 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,18 @@ public static function getLoader()

$loader->register(true);

$includeFiles = \Composer\Autoload\ComposerStaticInita8011b477bb239488e5d139cdeb7b31e::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirea8011b477bb239488e5d139cdeb7b31e($fileIdentifier, $file);
$filesToLoad = \Composer\Autoload\ComposerStaticInita8011b477bb239488e5d139cdeb7b31e::$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);
}

return $loader;
}
}

/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequirea8011b477bb239488e5d139cdeb7b31e($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

require $file;
}
}
10 changes: 10 additions & 0 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
'Kirby\\Cms\\LanguageRouter' => __DIR__ . '/../..' . '/src/Cms/LanguageRouter.php',
'Kirby\\Cms\\LanguageRoutes' => __DIR__ . '/../..' . '/src/Cms/LanguageRoutes.php',
'Kirby\\Cms\\LanguageRules' => __DIR__ . '/../..' . '/src/Cms/LanguageRules.php',
'Kirby\\Cms\\LanguageVariable' => __DIR__ . '/../..' . '/src/Cms/LanguageVariable.php',
'Kirby\\Cms\\Languages' => __DIR__ . '/../..' . '/src/Cms/Languages.php',
'Kirby\\Cms\\Layout' => __DIR__ . '/../..' . '/src/Cms/Layout.php',
'Kirby\\Cms\\LayoutColumn' => __DIR__ . '/../..' . '/src/Cms/LayoutColumn.php',
Expand Down Expand Up @@ -256,6 +257,10 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
'Kirby\\Cms\\UserRules' => __DIR__ . '/../..' . '/src/Cms/UserRules.php',
'Kirby\\Cms\\Users' => __DIR__ . '/../..' . '/src/Cms/Users.php',
'Kirby\\Cms\\Visitor' => __DIR__ . '/../..' . '/src/Cms/Visitor.php',
'Kirby\\ComposerInstaller\\CmsInstaller' => __DIR__ . '/..' . '/getkirby/composer-installer/src/ComposerInstaller/CmsInstaller.php',
'Kirby\\ComposerInstaller\\Installer' => __DIR__ . '/..' . '/getkirby/composer-installer/src/ComposerInstaller/Installer.php',
'Kirby\\ComposerInstaller\\Plugin' => __DIR__ . '/..' . '/getkirby/composer-installer/src/ComposerInstaller/Plugin.php',
'Kirby\\ComposerInstaller\\PluginInstaller' => __DIR__ . '/..' . '/getkirby/composer-installer/src/ComposerInstaller/PluginInstaller.php',
'Kirby\\Data\\Data' => __DIR__ . '/../..' . '/src/Data/Data.php',
'Kirby\\Data\\Handler' => __DIR__ . '/../..' . '/src/Data/Handler.php',
'Kirby\\Data\\Json' => __DIR__ . '/../..' . '/src/Data/Json.php',
Expand All @@ -274,6 +279,7 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
'Kirby\\Email\\Body' => __DIR__ . '/../..' . '/src/Email/Body.php',
'Kirby\\Email\\Email' => __DIR__ . '/../..' . '/src/Email/Email.php',
'Kirby\\Email\\PHPMailer' => __DIR__ . '/../..' . '/src/Email/PHPMailer.php',
'Kirby\\Exception\\AuthException' => __DIR__ . '/../..' . '/src/Exception/AuthException.php',
'Kirby\\Exception\\BadMethodCallException' => __DIR__ . '/../..' . '/src/Exception/BadMethodCallException.php',
'Kirby\\Exception\\DuplicateException' => __DIR__ . '/../..' . '/src/Exception/DuplicateException.php',
'Kirby\\Exception\\ErrorPageException' => __DIR__ . '/../..' . '/src/Exception/ErrorPageException.php',
Expand Down Expand Up @@ -330,22 +336,26 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
'Kirby\\Image\\Darkroom\\ImageMagick' => __DIR__ . '/../..' . '/src/Image/Darkroom/ImageMagick.php',
'Kirby\\Image\\Dimensions' => __DIR__ . '/../..' . '/src/Image/Dimensions.php',
'Kirby\\Image\\Exif' => __DIR__ . '/../..' . '/src/Image/Exif.php',
'Kirby\\Image\\Focus' => __DIR__ . '/../..' . '/src/Image/Focus.php',
'Kirby\\Image\\Image' => __DIR__ . '/../..' . '/src/Image/Image.php',
'Kirby\\Image\\Location' => __DIR__ . '/../..' . '/src/Image/Location.php',
'Kirby\\Option\\Option' => __DIR__ . '/../..' . '/src/Option/Option.php',
'Kirby\\Option\\Options' => __DIR__ . '/../..' . '/src/Option/Options.php',
'Kirby\\Option\\OptionsApi' => __DIR__ . '/../..' . '/src/Option/OptionsApi.php',
'Kirby\\Option\\OptionsProvider' => __DIR__ . '/../..' . '/src/Option/OptionsProvider.php',
'Kirby\\Option\\OptionsQuery' => __DIR__ . '/../..' . '/src/Option/OptionsQuery.php',
'Kirby\\Panel\\Assets' => __DIR__ . '/../..' . '/src/Panel/Assets.php',
'Kirby\\Panel\\Dialog' => __DIR__ . '/../..' . '/src/Panel/Dialog.php',
'Kirby\\Panel\\Document' => __DIR__ . '/../..' . '/src/Panel/Document.php',
'Kirby\\Panel\\Drawer' => __DIR__ . '/../..' . '/src/Panel/Drawer.php',
'Kirby\\Panel\\Dropdown' => __DIR__ . '/../..' . '/src/Panel/Dropdown.php',
'Kirby\\Panel\\Field' => __DIR__ . '/../..' . '/src/Panel/Field.php',
'Kirby\\Panel\\File' => __DIR__ . '/../..' . '/src/Panel/File.php',
'Kirby\\Panel\\Home' => __DIR__ . '/../..' . '/src/Panel/Home.php',
'Kirby\\Panel\\Json' => __DIR__ . '/../..' . '/src/Panel/Json.php',
'Kirby\\Panel\\Model' => __DIR__ . '/../..' . '/src/Panel/Model.php',
'Kirby\\Panel\\Page' => __DIR__ . '/../..' . '/src/Panel/Page.php',
'Kirby\\Panel\\PageCreateDialog' => __DIR__ . '/../..' . '/src/Panel/PageCreateDialog.php',
'Kirby\\Panel\\Panel' => __DIR__ . '/../..' . '/src/Panel/Panel.php',
'Kirby\\Panel\\Plugins' => __DIR__ . '/../..' . '/src/Panel/Plugins.php',
'Kirby\\Panel\\Redirect' => __DIR__ . '/../..' . '/src/Panel/Redirect.php',
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'getkirby/cms',
'pretty_version' => '3.9.4',
'version' => '3.9.4.0',
'pretty_version' => '4.0.0-alpha.1',
'version' => '4.0.0.0-alpha1',
'reference' => NULL,
'type' => 'kirby-cms',
'install_path' => __DIR__ . '/../../',
Expand Down Expand Up @@ -38,8 +38,8 @@
'dev_requirement' => false,
),
'getkirby/cms' => array(
'pretty_version' => '3.9.4',
'version' => '3.9.4.0',
'pretty_version' => '4.0.0-alpha.1',
'version' => '4.0.0.0-alpha1',
'reference' => NULL,
'type' => 'kirby-cms',
'install_path' => __DIR__ . '/../../',
Expand Down

0 comments on commit 2030a2d

Please sign in to comment.