From 1010a7dbfb1edf99e56d2f402d7d15d094944048 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 29 Oct 2016 14:59:09 +0200 Subject: php-sabre-xml: switch from symfony/class-loader to fedora/autoloader --- php-sabre-xml-autoload.php | 20 ++++---------------- php-sabre-xml.spec | 13 +++++++------ 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/php-sabre-xml-autoload.php b/php-sabre-xml-autoload.php index d8eeb00..c50ba4e 100644 --- a/php-sabre-xml-autoload.php +++ b/php-sabre-xml-autoload.php @@ -1,26 +1,14 @@ register(); -} - -$fedoraClassLoader->addPrefix('Sabre\\Xml\\', dirname(dirname(__DIR__))); +\Fedora\Autoloader\Autoload::addPsr4('Sabre\\Xml\\', __DIR__); // Functions require_once __DIR__ . '/Deserializer/functions.php'; require_once __DIR__ . '/Serializer/functions.php'; // Dependencies -require_once $vendorDir . '/Sabre/Uri/autoload.php'; +require_once '/usr/share/php/Sabre/Uri/autoload.php'; diff --git a/php-sabre-xml.spec b/php-sabre-xml.spec index 7d4e278..9f120a0 100644 --- a/php-sabre-xml.spec +++ b/php-sabre-xml.spec @@ -20,7 +20,7 @@ Name: php-%{gh_project} Summary: XML library that you may not hate Version: 1.5.0 -Release: 1%{?dist} +Release: 2%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} License: BSD @@ -43,7 +43,7 @@ BuildRequires: php-spl # "phpunit/phpunit" : "*" BuildRequires: php-composer(phpunit/phpunit) # Autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require" : { @@ -63,7 +63,7 @@ Requires: php-composer(sabre/uri) < 3 Requires: php-pcre Requires: php-spl # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) Provides: php-composer(sabre/xml) = %{version} @@ -100,9 +100,7 @@ cat << 'EOF' | tee vendor/autoload.php require_once '%{buildroot}%{_datadir}/php/Sabre/Xml/autoload.php'; // Tests require_once '%{_datadir}/php/Symfony/Component/ClassLoader/Psr4ClassLoader.php'; -$fedoraPsr4ClassLoader = new \Symfony\Component\ClassLoader\Psr4ClassLoader(); -$fedoraPsr4ClassLoader->register(true); -$fedoraPsr4ClassLoader->addPrefix('Sabre\\Xml\\', dirname(__DIR__).'/tests/Sabre/Xml/'); +\Fedora\Autoloader\Autoload::addPsr4('Sabre\\Xml\\', dirname(__DIR__).'/tests/Sabre/Xml/'); EOF cd tests @@ -142,6 +140,9 @@ rm -rf %{buildroot} %changelog +* Sat Oct 29 2016 Remi Collet - 1.5.0-2 +- switch from symfony/class-loader to fedora/autoloader + * Mon Oct 10 2016 Remi Collet - 1.5.0-1 - update to 1.5.0 - raise dependency on PHP 5.5 -- cgit