From 8f6d8e7d5a49a447c86927ef812d4b108ae900fe Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 20 Oct 2016 18:50:45 +0200 Subject: php-composer-semver: switch from symfony/class-loader to fedora/autoloader --- php-composer-semver-autoload.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'php-composer-semver-autoload.php') diff --git a/php-composer-semver-autoload.php b/php-composer-semver-autoload.php index 46fe812..e7999e6 100644 --- a/php-composer-semver-autoload.php +++ b/php-composer-semver-autoload.php @@ -2,14 +2,9 @@ /* Autoloader for composer/semver 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\\Semver\\', dirname(dirname(__DIR__))); +\Fedora\Autoloader\Autoload::addPsr4('Composer\\Semver\\', __DIR__); + -- cgit