summaryrefslogtreecommitdiffstats
path: root/phar-utils-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-21 11:16:42 +0200
committerRemi Collet <fedora@famillecollet.com>2016-10-21 11:16:42 +0200
commit7fec0b1c264ed6146be606b666aba1adb909d24c (patch)
treee7c8ad4c33981ae59053f8e825830fa33a8f76d2 /phar-utils-autoload.php
parentceea8c8c6018e54aebb969bd0fb50b3584d81610 (diff)
php-seld-phar-utils: fedora autoloader
Diffstat (limited to 'phar-utils-autoload.php')
-rw-r--r--phar-utils-autoload.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/phar-utils-autoload.php b/phar-utils-autoload.php
index 0b8dbac..622780c 100644
--- a/phar-utils-autoload.php
+++ b/phar-utils-autoload.php
@@ -1,15 +1,9 @@
<?php
/* Autoloader for seld/phar-utils 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('Seld\\PharUtils\\', dirname(dirname(__DIR__)));
+\Fedora\Autoloader\Autoload::addPsr4('Seld\\PharUtils\\', __DIR__);
+