diff options
-rw-r--r-- | phar-utils-autoload.php | 14 | ||||
-rw-r--r-- | php-seld-phar-utils.spec | 11 |
2 files changed, 11 insertions, 14 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__); + diff --git a/php-seld-phar-utils.spec b/php-seld-phar-utils.spec index 71c3724..548828b 100644 --- a/php-seld-phar-utils.spec +++ b/php-seld-phar-utils.spec @@ -13,7 +13,7 @@ Name: php-seld-phar-utils Version: 1.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: PHAR file format utilities Group: Development/Libraries @@ -30,7 +30,7 @@ BuildRequires: php(language) >= 5.3 # For test BuildRequires: php-cli # Autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) # From composer.json # "php": ">=5.3.0", @@ -41,7 +41,7 @@ Requires: php-hash Requires: php-pcre Requires: php-spl # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) Provides: php-composer(seld/phar-utils) = %{version} @@ -94,9 +94,12 @@ rm -rf %{buildroot} %changelog +* Fri Oct 21 2016 Remi Collet <remi@fedoraproject.org> - 1.0.1-2 +- switch from symfony/class-loader to fedora/autoloader + * Wed Oct 14 2015 Remi Collet <remi@fedoraproject.org> - 1.0.1-1 - update to 1.0.1 - add autoloader * Mon May 4 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-1 -- initial package
\ No newline at end of file +- initial package |