From d96a296a6fae3966f1a58fafaddad3e84e1f5f77 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 Dec 2017 11:43:41 +0100 Subject: switch from zend-loader to fedora/autoloader --- php-zendframework-zendxml.spec | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/php-zendframework-zendxml.spec b/php-zendframework-zendxml.spec index f5ea414..dbaf9ef 100644 --- a/php-zendframework-zendxml.spec +++ b/php-zendframework-zendxml.spec @@ -21,7 +21,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 1.0.2 -Release: 2%{?dist} +Release: 5%{?dist} Summary: Zend Framework %{library} component Group: Development/Libraries @@ -43,9 +43,9 @@ BuildRequires: php-spl # "phpunit/phpunit": "^3.7 || ^4.0", # "squizlabs/php_codesniffer": "~1.5" BuildRequires: php-composer(phpunit/phpunit) >= 3.7 -# Autoloader -BuildRequires: php-composer(%{gh_owner}/zend-loader) %endif +# Autoloader +BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.3.3 || ^7.0" @@ -56,10 +56,13 @@ Requires: php-dom Requires: php-libxml Requires: php-pcre Requires: php-spl +# Autoloader +Requires: php-composer(fedora/autoloader) Obsoletes: php-ZendFramework2-%{library} < 2.5 Provides: php-ZendFramework2-%{library} = 1:%{version} Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} %description @@ -73,7 +76,8 @@ mv LICENSE.md LICENSE %build -# Empty build section, nothing required +: Create autoloader +phpab --template fedora --output library/%{library}/autoload.php library/%{library} %install @@ -86,17 +90,8 @@ cp -pr library/%{library} %{buildroot}%{php_home}/%{library} mkdir vendor cat << 'EOF' | tee vendor/autoload.php array( - 'fallback_autoloader' => true, - 'autoregister_zf' => true, - 'namespaces' => array( - 'ZendTest\\Xml' => dirname(__DIR__).'/tests/ZendXmlTest', - '%{library}' => '%{buildroot}%{php_home}/%{library}' - ) - ) -)); +require_once '%{buildroot}%{php_home}/%{library}/autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\Xml\\', dirname(__DIR__) . '/test'); EOF cd tests @@ -121,6 +116,9 @@ exit $ret %changelog +* Wed Dec 6 2017 Remi Collet - 1.0.2-5 +- switch from zend-loader to fedora/autoloader + * Sat Jun 11 2016 Shawn Iwinski - 1.0.2-2 - Allow F22 / EPEL7 / EPEL6 (ZF 2.4) -- cgit