From 882e0cae81a61d24c0bbc822a9bce93d5d49a6a4 Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Mon, 5 May 2025 15:37:26 +0300 Subject: [PATCH] Add missing php bootstraping --- app/vendor/cakephp-plugins.php | 1 + app/vendor/composer/ClassLoader.php | 41 +++++++++---------------- app/vendor/composer/autoload_psr4.php | 6 ++-- app/vendor/composer/autoload_real.php | 27 ++++++++++------ app/vendor/composer/autoload_static.php | 37 +++++++++------------- 5 files changed, 49 insertions(+), 63 deletions(-) diff --git a/app/vendor/cakephp-plugins.php b/app/vendor/cakephp-plugins.php index 8497f738b..79406d9c3 100644 --- a/app/vendor/cakephp-plugins.php +++ b/app/vendor/cakephp-plugins.php @@ -12,6 +12,7 @@ 'DebugKit' => $baseDir . '/vendor/cakephp/debug_kit/', 'EnvSource' => $baseDir . '/plugins/EnvSource/', 'Migrations' => $baseDir . '/vendor/cakephp/migrations/', + 'OrcidSource' => $baseDir . '/plugins/OrcidSource/', 'TestWidget' => $baseDir . '/plugins/TestWidget/', ], ]; diff --git a/app/vendor/composer/ClassLoader.php b/app/vendor/composer/ClassLoader.php index a72151c77..afef3fa2a 100644 --- a/app/vendor/composer/ClassLoader.php +++ b/app/vendor/composer/ClassLoader.php @@ -42,9 +42,6 @@ */ 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 @@ public function unregister() public function loadClass($class) { if ($file = $this->findFile($class)) { - $includeFile = self::$includeFile; - $includeFile($file); + includeFile($file); return true; } @@ -560,26 +555,18 @@ private function findFileWithExtension($class, $ext) 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; } diff --git a/app/vendor/composer/autoload_psr4.php b/app/vendor/composer/autoload_psr4.php index db3323307..72b5df30c 100644 --- a/app/vendor/composer/autoload_psr4.php +++ b/app/vendor/composer/autoload_psr4.php @@ -8,8 +8,6 @@ return array( 'Twig\\Extra\\Markdown\\' => array($vendorDir . '/twig/markdown-extra'), 'Twig\\' => array($vendorDir . '/twig/twig/src'), - 'TestPlugin\\Test\\' => array($baseDir . '/availableplugins/TestPlugin/tests'), - 'TestPlugin\\' => array($baseDir . '/availableplugins/TestPlugin/src'), 'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'), 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'), @@ -47,6 +45,8 @@ 'Phinx\\' => array($vendorDir . '/robmorgan/phinx/src/Phinx'), 'PHPStan\\PhpDocParser\\' => array($vendorDir . '/phpstan/phpdoc-parser/src'), 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'), + 'OrcidSource\\Test\\' => array($baseDir . '/plugins/OrcidSource/tests'), + 'OrcidSource\\' => array($baseDir . '/plugins/OrcidSource/src'), 'Migrations\\' => array($vendorDir . '/cakephp/migrations/src'), 'Masterminds\\' => array($vendorDir . '/masterminds/html5/src'), 'M1\\Env\\' => array($vendorDir . '/m1/env/src'), @@ -71,8 +71,6 @@ 'DebugKit\\' => array($vendorDir . '/cakephp/debug_kit/src'), 'CoreServer\\Test\\' => array($baseDir . '/plugins/CoreServer/tests'), 'CoreServer\\' => array($baseDir . '/plugins/CoreServer/src'), - 'CoreReport\\Test\\' => array($baseDir . '/plugins/CoreReport/tests'), - 'CoreReport\\' => array($baseDir . '/plugins/CoreReport/src'), 'CoreJob\\Test\\' => array($baseDir . '/plugins/CoreJob/tests'), 'CoreJob\\' => array($baseDir . '/plugins/CoreJob/src'), 'CoreEnroller\\Test\\' => array($baseDir . '/plugins/CoreEnroller/tests'), diff --git a/app/vendor/composer/autoload_real.php b/app/vendor/composer/autoload_real.php index 8072a483a..ea4df5fa0 100644 --- a/app/vendor/composer/autoload_real.php +++ b/app/vendor/composer/autoload_real.php @@ -33,18 +33,25 @@ public static function getLoader() $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInitb25f76eec921984aa94dcf4015a4846e::$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\ComposerStaticInitb25f76eec921984aa94dcf4015a4846e::$files; + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequireb25f76eec921984aa94dcf4015a4846e($fileIdentifier, $file); } return $loader; } } + +/** + * @param string $fileIdentifier + * @param string $file + * @return void + */ +function composerRequireb25f76eec921984aa94dcf4015a4846e($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } +} diff --git a/app/vendor/composer/autoload_static.php b/app/vendor/composer/autoload_static.php index b639386fc..32a07e523 100644 --- a/app/vendor/composer/autoload_static.php +++ b/app/vendor/composer/autoload_static.php @@ -55,8 +55,6 @@ class ComposerStaticInitb25f76eec921984aa94dcf4015a4846e array ( 'Twig\\Extra\\Markdown\\' => 20, 'Twig\\' => 5, - 'TestPlugin\\Test\\' => 16, - 'TestPlugin\\' => 11, ), 'S' => array ( @@ -104,7 +102,12 @@ class ComposerStaticInitb25f76eec921984aa94dcf4015a4846e 'PHPStan\\PhpDocParser\\' => 21, 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => 57, ), - 'M' => + 'O' => + array ( + 'OrcidSource\\Test\\' => 17, + 'OrcidSource\\' => 12, + ), + 'M' => array ( 'Migrations\\' => 11, 'Masterminds\\' => 12, @@ -148,8 +151,6 @@ class ComposerStaticInitb25f76eec921984aa94dcf4015a4846e array ( 'CoreServer\\Test\\' => 16, 'CoreServer\\' => 11, - 'CoreReport\\Test\\' => 16, - 'CoreReport\\' => 11, 'CoreJob\\Test\\' => 13, 'CoreJob\\' => 8, 'CoreEnroller\\Test\\' => 18, @@ -194,14 +195,6 @@ class ComposerStaticInitb25f76eec921984aa94dcf4015a4846e array ( 0 => __DIR__ . '/..' . '/twig/twig/src', ), - 'TestPlugin\\Test\\' => - array ( - 0 => __DIR__ . '/../..' . '/availableplugins/TestPlugin/tests', - ), - 'TestPlugin\\' => - array ( - 0 => __DIR__ . '/../..' . '/availableplugins/TestPlugin/src', - ), 'Symfony\\Polyfill\\Php81\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-php81', @@ -352,7 +345,15 @@ class ComposerStaticInitb25f76eec921984aa94dcf4015a4846e array ( 0 => __DIR__ . '/..' . '/dealerdirect/phpcodesniffer-composer-installer/src', ), - 'Migrations\\' => + 'OrcidSource\\Test\\' => + array ( + 0 => __DIR__ . '/../..' . '/plugins/OrcidSource/tests', + ), + 'OrcidSource\\' => + array ( + 0 => __DIR__ . '/../..' . '/plugins/OrcidSource/src', + ), + 'Migrations\\' => array ( 0 => __DIR__ . '/..' . '/cakephp/migrations/src', ), @@ -449,14 +450,6 @@ class ComposerStaticInitb25f76eec921984aa94dcf4015a4846e array ( 0 => __DIR__ . '/../..' . '/plugins/CoreServer/src', ), - 'CoreReport\\Test\\' => - array ( - 0 => __DIR__ . '/../..' . '/plugins/CoreReport/tests', - ), - 'CoreReport\\' => - array ( - 0 => __DIR__ . '/../..' . '/plugins/CoreReport/src', - ), 'CoreJob\\Test\\' => array ( 0 => __DIR__ . '/../..' . '/plugins/CoreJob/tests',