diff options
-rw-r--r-- | php-sabre-vobject-autoload.php | 17 | ||||
-rw-r--r-- | php-sabre-vobject.spec | 9 |
2 files changed, 9 insertions, 17 deletions
diff --git a/php-sabre-vobject-autoload.php b/php-sabre-vobject-autoload.php index aa94f26..436db79 100644 --- a/php-sabre-vobject-autoload.php +++ b/php-sabre-vobject-autoload.php @@ -1,18 +1,7 @@ <?php -/** - * Autoloader for sabre/vobject and its dependencies - */ +/* Autoloader for sabre/vobject 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'; - } +\Fedora\Autoloader\Autoload::addPsr4('Sabre\\VObject\\', __DIR__); - $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); - $fedoraClassLoader->register(); -} - -$fedoraClassLoader->addPrefix('Sabre\\VObject\\', dirname(dirname(__DIR__))); diff --git a/php-sabre-vobject.spec b/php-sabre-vobject.spec index 5668aca..0324397 100644 --- a/php-sabre-vobject.spec +++ b/php-sabre-vobject.spec @@ -15,7 +15,7 @@ Name: php-%{gh_project} Summary: Library to parse and manipulate iCalendar and vCard objects Version: 3.5.3 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://sabre.io/vobject/ License: BSD @@ -38,7 +38,7 @@ BuildRequires: php-pcre BuildRequires: php-spl BuildRequires: php-xml # Autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json @@ -54,7 +54,7 @@ Requires: php-pcre Requires: php-spl Requires: php-xml # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) Provides: php-composer(sabre/vobject) = %{version} @@ -131,6 +131,9 @@ exit $ret %changelog +* Sat Oct 29 2016 Remi Collet <remi@fedoraproject.org> - 3.5.3-3 +- switch from symfony/class-loader to fedora/autoloader + * Fri Oct 7 2016 Remi Collet <remi@fedoraproject.org> - 3.5.3-1 - update to 3.5.3 |