diff -up ./src/Autoloader.php.rpm ./src/Autoloader.php --- ./src/Autoloader.php.rpm 2020-03-27 07:50:26.000000000 +0100 +++ ./src/Autoloader.php 2020-03-27 07:51:49.165983073 +0100 @@ -9,7 +9,6 @@ namespace Laminas\ZendFrameworkBridge; use ArrayObject; -use Composer\Autoload\ClassLoader; use RuntimeException; use function array_values; @@ -50,7 +49,6 @@ class Autoloader spl_autoload_register(self::createPrependAutoloader( RewriteRules::namespaceReverse(), - self::getClassLoader(), $loaded ), true, true); @@ -61,32 +59,15 @@ class Autoloader } /** - * @return ClassLoader - * @throws RuntimeException - */ - private static function getClassLoader() - { - if (file_exists(__DIR__ . '/../../../autoload.php')) { - return include __DIR__ . '/../../../autoload.php'; - } - - if (file_exists(__DIR__ . '/../vendor/autoload.php')) { - return include __DIR__ . '/../vendor/autoload.php'; - } - - throw new RuntimeException('Cannot detect composer autoload. Please run composer install'); - } - - /** * @return callable */ - private static function createPrependAutoloader(array $namespaces, ClassLoader $classLoader, ArrayObject $loaded) + private static function createPrependAutoloader(array $namespaces, ArrayObject $loaded) { /** * @param string $class Class name to autoload * @return void */ - return static function ($class) use ($namespaces, $classLoader, $loaded) { + return static function ($class) use ($namespaces, $loaded) { if (isset($loaded[$class])) { return; } @@ -105,7 +86,7 @@ class Autoloader return; } - if ($classLoader->loadClass($class)) { + if (\Fedora\Autoloader\Autoload::loadClass($class)) { $legacy = $namespaces[$check] . strtr(substr($class, strlen($check)), [ 'ApiTools' => 'Apigility', diff -up ./src/Replacements.php.rpm ./src/Replacements.php --- ./src/Replacements.php.rpm 2020-03-27 07:50:49.818286139 +0100 +++ ./src/Replacements.php 2020-03-27 07:52:36.321742255 +0100 @@ -21,7 +21,7 @@ class Replacements public function __construct(array $additionalReplacements = []) { $this->replacements = array_merge( - require __DIR__ . '/../config/replacements.php', + require __DIR__ . '/config/replacements.php', $additionalReplacements );