| @@ -1,9 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // autoload_real.php @generated by Composer |
| 4 | 4 | |
| 5 | -class ComposerAutoloaderInitc52d9475efbd3c9eb8ffd0ed9fcf171a | |
| 5 | +class ComposerAutoloaderInit38c1852057a6e3ae12ab11237bcb980b | |
| 6 | 6 | { |
| 7 | 7 | private static $loader; |
| 8 | 8 | |
| 9 | 9 | public static function loadClassLoader($class) |
| @@ -23,16 +23,42 @@ | ||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | require __DIR__ . '/platform_check.php'; |
| 26 | 26 | |
| 27 | - spl_autoload_register(array('ComposerAutoloaderInitc52d9475efbd3c9eb8ffd0ed9fcf171a', 'loadClassLoader'), true, true); | |
| 27 | + spl_autoload_register(array('ComposerAutoloaderInit38c1852057a6e3ae12ab11237bcb980b', 'loadClassLoader'), true, true); | |
| 28 | 28 | self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); |
| 29 | - spl_autoload_unregister(array('ComposerAutoloaderInitc52d9475efbd3c9eb8ffd0ed9fcf171a', 'loadClassLoader')); | |
| 29 | + spl_autoload_unregister(array('ComposerAutoloaderInit38c1852057a6e3ae12ab11237bcb980b', 'loadClassLoader')); | |
| 30 | 30 | |
| 31 | + // Add a custom filter to prevent loading Square classes on incompatible PHP versions | |
| 32 | + if (defined('CHARITABLE_SQUARE_AVAILABLE') && !CHARITABLE_SQUARE_AVAILABLE) { | |
| 33 | + // Register a function that will prevent loading Square classes | |
| 34 | + spl_autoload_register(function($class) { | |
| 35 | + // Skip loading classes in the Square namespace | |
| 36 | + if (strpos($class, 'Square\\') === 0) { | |
| 37 | + // Return true to indicate the class was "loaded" (prevents other autoloaders from trying) | |
| 38 | + return true; | |
| 39 | + } | |
| 40 | + // Let other autoloaders handle non-Square classes | |
| 41 | + return false; | |
| 42 | + }, true, true); // prepend=true to ensure this runs before Composer's autoloader | |
| 43 | + } | |
| 44 | + | |
| 31 | 45 | require __DIR__ . '/autoload_static.php'; |
| 32 | - call_user_func(\Composer\Autoload\ComposerStaticInitc52d9475efbd3c9eb8ffd0ed9fcf171a::getInitializer($loader)); | |
| 46 | + call_user_func(\Composer\Autoload\ComposerStaticInit38c1852057a6e3ae12ab11237bcb980b::getInitializer($loader)); | |
| 33 | 47 | |
| 34 | 48 | $loader->register(true); |
| 49 | + | |
| 50 | + $filesToLoad = \Composer\Autoload\ComposerStaticInit38c1852057a6e3ae12ab11237bcb980b::$files; | |
| 51 | + $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { | |
| 52 | + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { | |
| 53 | + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; | |
| 54 | + | |
| 55 | + require $file; | |
| 56 | + } | |
| 57 | + }, null, null); | |
| 58 | + foreach ($filesToLoad as $fileIdentifier => $file) { | |
| 59 | + $requireFile($fileIdentifier, $file); | |
| 60 | + } | |
| 35 | 61 | |
| 36 | 62 | return $loader; |
| 37 | 63 | } |
| 38 | 64 | } |