Skip to content

Commit

Permalink
Add missing php bootstraping
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed May 5, 2025
1 parent de05874 commit 882e0ca
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 63 deletions.
1 change: 1 addition & 0 deletions app/vendor/cakephp-plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
],
];
41 changes: 14 additions & 27 deletions app/vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;

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

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

/**
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
6 changes: 2 additions & 4 deletions app/vendor/composer/autoload_psr4.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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'),
Expand All @@ -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'),
Expand Down
27 changes: 17 additions & 10 deletions app/vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
37 changes: 15 additions & 22 deletions app/vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ class ComposerStaticInitb25f76eec921984aa94dcf4015a4846e
array (
'Twig\\Extra\\Markdown\\' => 20,
'Twig\\' => 5,
'TestPlugin\\Test\\' => 16,
'TestPlugin\\' => 11,
),
'S' =>
array (
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
),
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 882e0ca

Please sign in to comment.