aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sharebymail/composer
diff options
context:
space:
mode:
Diffstat (limited to 'apps/sharebymail/composer')
-rw-r--r--apps/sharebymail/composer/composer/ClassLoader.php12
-rw-r--r--apps/sharebymail/composer/composer/InstalledVersions.php17
-rw-r--r--apps/sharebymail/composer/composer/installed.php4
3 files changed, 22 insertions, 11 deletions
diff --git a/apps/sharebymail/composer/composer/ClassLoader.php b/apps/sharebymail/composer/composer/ClassLoader.php
index fd56bd7d840..a72151c77c8 100644
--- a/apps/sharebymail/composer/composer/ClassLoader.php
+++ b/apps/sharebymail/composer/composer/ClassLoader.php
@@ -429,7 +429,8 @@ class ClassLoader
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
- (self::$includeFile)($file);
+ $includeFile = self::$includeFile;
+ $includeFile($file);
return true;
}
@@ -560,7 +561,10 @@ class ClassLoader
return false;
}
- private static function initializeIncludeClosure(): void
+ /**
+ * @return void
+ */
+ private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
@@ -574,8 +578,8 @@ class ClassLoader
* @param string $file
* @return void
*/
- self::$includeFile = static function($file) {
+ self::$includeFile = \Closure::bind(static function($file) {
include $file;
- };
+ }, null, null);
}
}
diff --git a/apps/sharebymail/composer/composer/InstalledVersions.php b/apps/sharebymail/composer/composer/InstalledVersions.php
index c6b54af7ba2..51e734a774b 100644
--- a/apps/sharebymail/composer/composer/InstalledVersions.php
+++ b/apps/sharebymail/composer/composer/InstalledVersions.php
@@ -98,7 +98,7 @@ class InstalledVersions
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
- return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
+ return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
@@ -119,7 +119,7 @@ class InstalledVersions
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
- $constraint = $parser->parseConstraints($constraint);
+ $constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
@@ -328,7 +328,9 @@ class InstalledVersions
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';
+ /** @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;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
@@ -340,12 +342,17 @@ class InstalledVersions
// 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') {
- self::$installed = require __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;
} else {
self::$installed = array();
}
}
- $installed[] = self::$installed;
+
+ if (self::$installed !== array()) {
+ $installed[] = self::$installed;
+ }
return $installed;
}
diff --git a/apps/sharebymail/composer/composer/installed.php b/apps/sharebymail/composer/composer/installed.php
index a1f6a8636b4..1426826287d 100644
--- a/apps/sharebymail/composer/composer/installed.php
+++ b/apps/sharebymail/composer/composer/installed.php
@@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
+ 'reference' => 'dd3d689e04a5e1d558da937ca72980e0e2c7c404',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
@@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
+ 'reference' => 'dd3d689e04a5e1d558da937ca72980e0e2c7c404',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),