diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-10-20 19:02:53 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-10-20 19:02:53 +0200 |
commit | 39a7dab5bbe7465df3cbfcad0961b5f9372e9d71 (patch) | |
tree | 084cc41bc453c1ebeef30851c941a7f637a31b84 /php-composer-ca-bundle-autoload.php | |
parent | 623b3c25b5da09870d5b8b4a7424583dbccb194c (diff) |
php-composer-ca-bundle: switch from symfony/class-loader to fedora/autoloader
Diffstat (limited to 'php-composer-ca-bundle-autoload.php')
-rw-r--r-- | php-composer-ca-bundle-autoload.php | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/php-composer-ca-bundle-autoload.php b/php-composer-ca-bundle-autoload.php index 1a2459d..85241c7 100644 --- a/php-composer-ca-bundle-autoload.php +++ b/php-composer-ca-bundle-autoload.php @@ -2,14 +2,9 @@ /* Autoloader for composer/ca-bundle 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\\CaBundle\\', dirname(dirname(__DIR__))); +\Fedora\Autoloader\Autoload::addPsr4('Composer\\CaBundle\\', __DIR__); + |