diff options
author | Bennet Becker <bbecker@pks.mpg.de> | 2022-12-23 12:53:20 +0100 |
---|---|---|
committer | Bennet Becker <dev@bennet.cc> | 2022-12-23 19:26:58 +0100 |
commit | 77569bae4511c057e3023c01fa247aae60a0a3a3 (patch) | |
tree | 938f187f807c9d53eb87445816e16e8544565e00 /lib | |
parent | c1c6d215c74a8246183510b7a4e94aa07e5b82d4 (diff) | |
download | nextcloud-server-77569bae4511c057e3023c01fa247aae60a0a3a3.tar.gz nextcloud-server-77569bae4511c057e3023c01fa247aae60a0a3a3.zip |
ran build/autoloaderchecker.sh after adding AutoSubmittedValue class
Signed-off-by: Bennet Becker <bbecker@pks.mpg.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/composer/composer/ClassLoader.php | 37 | ||||
-rw-r--r-- | lib/composer/composer/autoload_classmap.php | 1 | ||||
-rw-r--r-- | lib/composer/composer/autoload_real.php | 27 | ||||
-rw-r--r-- | lib/composer/composer/autoload_static.php | 1 |
4 files changed, 35 insertions, 31 deletions
diff --git a/lib/composer/composer/ClassLoader.php b/lib/composer/composer/ClassLoader.php index afef3fa2ad8..fd56bd7d840 100644 --- a/lib/composer/composer/ClassLoader.php +++ b/lib/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/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 08a871e8466..2851d76ff4b 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -478,6 +478,7 @@ return array( 'OCP\\Log\\ILogFactory' => $baseDir . '/lib/public/Log/ILogFactory.php', 'OCP\\Log\\IWriter' => $baseDir . '/lib/public/Log/IWriter.php', 'OCP\\Log\\RotationTrait' => $baseDir . '/lib/public/Log/RotationTrait.php', + 'OCP\\Mail\\AutoSubmittedValue' => $baseDir . '/lib/public/Mail/AutoSubmittedValue.php', 'OCP\\Mail\\Events\\BeforeMessageSent' => $baseDir . '/lib/public/Mail/Events/BeforeMessageSent.php', 'OCP\\Mail\\IAttachment' => $baseDir . '/lib/public/Mail/IAttachment.php', 'OCP\\Mail\\IEMailTemplate' => $baseDir . '/lib/public/Mail/IEMailTemplate.php', diff --git a/lib/composer/composer/autoload_real.php b/lib/composer/composer/autoload_real.php index 6b98041770d..6dbf91afee6 100644 --- a/lib/composer/composer/autoload_real.php +++ b/lib/composer/composer/autoload_real.php @@ -31,25 +31,18 @@ class ComposerAutoloaderInit749170dad3f5e7f9ca158f5a9f04f6a2 $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2::$files; - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire749170dad3f5e7f9ca158f5a9f04f6a2($fileIdentifier, $file); + $filesToLoad = \Composer\Autoload\ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2::$files; + $requireFile = static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }; + foreach ($filesToLoad as $fileIdentifier => $file) { + ($requireFile)($fileIdentifier, $file); } return $loader; } } - -/** - * @param string $fileIdentifier - * @param string $file - * @return void - */ -function composerRequire749170dad3f5e7f9ca158f5a9f04f6a2($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - - require $file; - } -} diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index eec226c9a6e..404d903b526 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -511,6 +511,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OCP\\Log\\ILogFactory' => __DIR__ . '/../../..' . '/lib/public/Log/ILogFactory.php', 'OCP\\Log\\IWriter' => __DIR__ . '/../../..' . '/lib/public/Log/IWriter.php', 'OCP\\Log\\RotationTrait' => __DIR__ . '/../../..' . '/lib/public/Log/RotationTrait.php', + 'OCP\\Mail\\AutoSubmittedValue' => __DIR__ . '/../../..' . '/lib/public/Mail/AutoSubmittedValue.php', 'OCP\\Mail\\Events\\BeforeMessageSent' => __DIR__ . '/../../..' . '/lib/public/Mail/Events/BeforeMessageSent.php', 'OCP\\Mail\\IAttachment' => __DIR__ . '/../../..' . '/lib/public/Mail/IAttachment.php', 'OCP\\Mail\\IEMailTemplate' => __DIR__ . '/../../..' . '/lib/public/Mail/IEMailTemplate.php', |