Mercurial > hg > rc1
comparison vendor/composer/autoload_real.php @ 43:771f6803cc4b default tip
somehow lost the correctly updated metadata so e.g. 'mail' package wasn't being imported
author | Charlie Root |
---|---|
date | Sun, 26 Jan 2025 13:13:49 -0500 |
parents | 05c4c32948af |
children |
comparison
equal
deleted
inserted
replaced
42:db1e51c59ddc | 43:771f6803cc4b |
---|---|
11 if ('Composer\Autoload\ClassLoader' === $class) { | 11 if ('Composer\Autoload\ClassLoader' === $class) { |
12 require __DIR__ . '/ClassLoader.php'; | 12 require __DIR__ . '/ClassLoader.php'; |
13 } | 13 } |
14 } | 14 } |
15 | 15 |
16 /** | |
17 * @return \Composer\Autoload\ClassLoader | |
18 */ | |
16 public static function getLoader() | 19 public static function getLoader() |
17 { | 20 { |
18 if (null !== self::$loader) { | 21 if (null !== self::$loader) { |
19 return self::$loader; | 22 return self::$loader; |
20 } | 23 } |
21 | 24 |
25 require __DIR__ . '/platform_check.php'; | |
26 | |
22 spl_autoload_register(array('ComposerAutoloaderInitd52cd7aa2b1301e6e89413f57235d2fc', 'loadClassLoader'), true, true); | 27 spl_autoload_register(array('ComposerAutoloaderInitd52cd7aa2b1301e6e89413f57235d2fc', 'loadClassLoader'), true, true); |
23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); | 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); |
24 spl_autoload_unregister(array('ComposerAutoloaderInitd52cd7aa2b1301e6e89413f57235d2fc', 'loadClassLoader')); | 29 spl_autoload_unregister(array('ComposerAutoloaderInitd52cd7aa2b1301e6e89413f57235d2fc', 'loadClassLoader')); |
25 | 30 |
26 $includePaths = require __DIR__ . '/include_paths.php'; | 31 $includePaths = require __DIR__ . '/include_paths.php'; |
27 array_push($includePaths, get_include_path()); | 32 $includePaths[] = get_include_path(); |
28 set_include_path(implode(PATH_SEPARATOR, $includePaths)); | 33 set_include_path(implode(PATH_SEPARATOR, $includePaths)); |
29 | 34 |
30 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); | 35 require __DIR__ . '/autoload_static.php'; |
31 if ($useStaticLoader) { | 36 call_user_func(\Composer\Autoload\ComposerStaticInitd52cd7aa2b1301e6e89413f57235d2fc::getInitializer($loader)); |
32 require_once __DIR__ . '/autoload_static.php'; | |
33 | |
34 call_user_func(\Composer\Autoload\ComposerStaticInitd52cd7aa2b1301e6e89413f57235d2fc::getInitializer($loader)); | |
35 } else { | |
36 $map = require __DIR__ . '/autoload_namespaces.php'; | |
37 foreach ($map as $namespace => $path) { | |
38 $loader->set($namespace, $path); | |
39 } | |
40 | |
41 $map = require __DIR__ . '/autoload_psr4.php'; | |
42 foreach ($map as $namespace => $path) { | |
43 $loader->setPsr4($namespace, $path); | |
44 } | |
45 | |
46 $classMap = require __DIR__ . '/autoload_classmap.php'; | |
47 if ($classMap) { | |
48 $loader->addClassMap($classMap); | |
49 } | |
50 } | |
51 | 37 |
52 $loader->register(true); | 38 $loader->register(true); |
53 | 39 |
54 if ($useStaticLoader) { | 40 $filesToLoad = \Composer\Autoload\ComposerStaticInitd52cd7aa2b1301e6e89413f57235d2fc::$files; |
55 $includeFiles = Composer\Autoload\ComposerStaticInitd52cd7aa2b1301e6e89413f57235d2fc::$files; | 41 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { |
56 } else { | 42 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { |
57 $includeFiles = require __DIR__ . '/autoload_files.php'; | 43 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; |
58 } | 44 |
59 foreach ($includeFiles as $fileIdentifier => $file) { | 45 require $file; |
60 composerRequired52cd7aa2b1301e6e89413f57235d2fc($fileIdentifier, $file); | 46 } |
47 }, null, null); | |
48 foreach ($filesToLoad as $fileIdentifier => $file) { | |
49 $requireFile($fileIdentifier, $file); | |
61 } | 50 } |
62 | 51 |
63 return $loader; | 52 return $loader; |
64 } | 53 } |
65 } | 54 } |
66 | |
67 function composerRequired52cd7aa2b1301e6e89413f57235d2fc($fileIdentifier, $file) | |
68 { | |
69 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { | |
70 require $file; | |
71 | |
72 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; | |
73 } | |
74 } |