From 7e22df472aa162b572f5b2ba150f26cda1a26658 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 20 Oct 2016 19:00:41 +0200 Subject: php-composer-spdx-licenses: switch from symfony/class-loader to fedora/autoloader --- php-composer-spdx-licenses-autoload.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'php-composer-spdx-licenses-autoload.php') diff --git a/php-composer-spdx-licenses-autoload.php b/php-composer-spdx-licenses-autoload.php index 3d84359..652aff6 100644 --- a/php-composer-spdx-licenses-autoload.php +++ b/php-composer-spdx-licenses-autoload.php @@ -2,14 +2,9 @@ /* Autoloader for composer/spdx-licenses and its dependencies */ $vendorDir = '/usr/share/php'; -// Use Symfony autoloader -if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) { - if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) { - require_once $vendorDir . '/Symfony/Component/ClassLoader/ClassLoader.php'; - } - - $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); - $fedoraClassLoader->register(); +if (!class_exists('Fedora\\Autoloader\\Autoload', false)) { + require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; } -$fedoraClassLoader->addPrefix('Composer\\Spdx\\', dirname(dirname(__DIR__))); +\Fedora\Autoloader\Autoload::addPsr4('Composer\\Spdx\\', __DIR__); + -- cgit