aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2023-01-26 09:17:52 +0100
committerGitHub <noreply@github.com>2023-01-26 09:17:52 +0100
commit40425035d234ca7af4cf1d7f1402a7a9b11ca18a (patch)
treea0b958fe4f47dee5521abe5a48c3828dbfe13788 /apps/settings
parent4caa90dfb643aea958b10d0741a8f21be5e18f39 (diff)
parentaee9941fedffc5b50192264ce3a4bd7edf25d6c6 (diff)
downloadnextcloud-server-40425035d234ca7af4cf1d7f1402a7a9b11ca18a.tar.gz
nextcloud-server-40425035d234ca7af4cf1d7f1402a7a9b11ca18a.zip
Merge pull request #36347 from nextcloud/chore/autoloader/composer-2.5.1-autoloader-files
chore(autoloaders): Update autoloader files for Composer 2.5.1
Diffstat (limited to 'apps/settings')
-rw-r--r--apps/settings/composer/composer/ClassLoader.php37
-rw-r--r--apps/settings/composer/composer/installed.php4
2 files changed, 25 insertions, 16 deletions
diff --git a/apps/settings/composer/composer/ClassLoader.php b/apps/settings/composer/composer/ClassLoader.php
index afef3fa2ad8..fd56bd7d840 100644
--- a/apps/settings/composer/composer/ClassLoader.php
+++ b/apps/settings/composer/composer/ClassLoader.php
@@ -42,6 +42,9 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
+ /** @var \Closure(string):void */
+ private static $includeFile;
+
/** @var ?string */
private $vendorDir;
@@ -106,6 +109,7 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
+ self::initializeIncludeClosure();
}
/**
@@ -425,7 +429,7 @@ class ClassLoader
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
- includeFile($file);
+ (self::$includeFile)($file);
return true;
}
@@ -555,18 +559,23 @@ class ClassLoader
return false;
}
-}
-/**
- * Scope isolated include.
- *
- * Prevents access to $this/self from included files.
- *
- * @param string $file
- * @return void
- * @private
- */
-function includeFile($file)
-{
- include $file;
+ private static function initializeIncludeClosure(): void
+ {
+ if (self::$includeFile !== null) {
+ return;
+ }
+
+ /**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ *
+ * @param string $file
+ * @return void
+ */
+ self::$includeFile = static function($file) {
+ include $file;
+ };
+ }
}
diff --git a/apps/settings/composer/composer/installed.php b/apps/settings/composer/composer/installed.php
index 10f4c04f799..a1f6a8636b4 100644
--- a/apps/settings/composer/composer/installed.php
+++ b/apps/settings/composer/composer/installed.php
@@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
+ 'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
@@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
+ 'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),