diff options
-rw-r--r-- | php-sabre-uri-autoload.php | 18 | ||||
-rw-r--r-- | php-sabre-uri.spec | 9 |
2 files changed, 9 insertions, 18 deletions
diff --git a/php-sabre-uri-autoload.php b/php-sabre-uri-autoload.php index f5a2e55..c92227b 100644 --- a/php-sabre-uri-autoload.php +++ b/php-sabre-uri-autoload.php @@ -1,21 +1,9 @@ <?php -/** - * Autoloader for sabre/uri and its dependencies - */ +/* Autoloader for sabre/uri and its dependencies */ -$vendorDir = '/usr/share/php'; +require_once '/usr/share/php/Fedora/Autoloader/autoload.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(); -} - -$fedoraClassLoader->addPrefix('Sabre\\Uri\\', dirname(dirname(__DIR__))); +\Fedora\Autoloader\Autoload::addPsr4('Sabre\\Uri\\', __DIR__); // Functions require_once __DIR__ . '/functions.php'; diff --git a/php-sabre-uri.spec b/php-sabre-uri.spec index 8a0156c..922a9f9 100644 --- a/php-sabre-uri.spec +++ b/php-sabre-uri.spec @@ -15,7 +15,7 @@ Name: php-%{gh_project} Summary: Functions for making sense out of URIs Version: 1.1.1 -Release: 1%{?dist} +Release: 2%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} License: BSD @@ -33,7 +33,7 @@ BuildRequires: php(language) > 5.4.7 BuildRequires: php-pcre BuildRequires: php-composer(phpunit/phpunit) # Autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require" : { @@ -42,7 +42,7 @@ Requires: php(language) > 5.4.7 # From phpcompatinfo report for version 1.1.0 Requires: php-pcre # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) Provides: php-composer(sabre/uri) = %{version} @@ -126,6 +126,9 @@ rm -rf %{buildroot} %changelog +* Sat Oct 29 2016 Remi Collet <remi@fedoraproject.org> - 1.1.1-2 +- switch from symfony/class-loader to fedora/autoloader + * Thu Oct 27 2016 Remi Collet <remi@fedoraproject.org> - 1.1.1-1 - update to 1.1.1 |