From a7eaf58bdbcf6116c77849c03c48a2f3052010f6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 11 Dec 2017 13:16:59 +0100 Subject: switch from zend-loader to fedora/autoloader --- php-zendframework-zend-expressive-router.spec | 56 +++++++++++++++------------ 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/php-zendframework-zend-expressive-router.spec b/php-zendframework-zend-expressive-router.spec index 7534ca5..06c0d6e 100644 --- a/php-zendframework-zend-expressive-router.spec +++ b/php-zendframework-zend-expressive-router.spec @@ -22,7 +22,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 2.0.0 -Release: 1%{?dist} +Release: 3%{?dist} Summary: %{sublib} subcomponent for %{library} Group: Development/Libraries @@ -44,11 +44,9 @@ BuildRequires: php-spl # "zendframework/zend-coding-standard": "~1.0.0", # "malukenho/docheader": "^0.1.5" BuildRequires: php-composer(phpunit/phpunit) >= 4.7 -# Autoloader -BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -# For dependencies autoloader -BuildRequires: php-zendframework-zend-loader >= 2.5.1-4 %endif +# Autoloader +BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", @@ -59,6 +57,8 @@ Requires: php-composer(psr/http-message) >= 1.0 Requires: php-composer(psr/http-message) < 2 Requires: php-composer(fig/http-message-util) >= 1.1 Requires: php-composer(fig/http-message-util) < 2 +# Autoloader +Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 1.2.0 Requires: php-pcre Requires: php-spl @@ -68,16 +68,14 @@ Requires: php-spl # "zendframework/zend-expressive-fastroute": "^1.2 to use the FastRoute routing adapter", # "zendframework/zend-expressive-zendrouter": "^1.2 to use the zend-router routing adapter" %if 0%{?fedora} >= 21 -Suggests: php-composer(%{gh_owner}/zend-expressive-aurarouter) -Suggests: php-composer(%{gh_owner}/zend-expressive-fastroute) -Suggests: php-composer(%{gh_owner}/zend-expressive-zendrouter) +Suggests: php-autoloader(%{gh_owner}/zend-expressive-aurarouter) +Suggests: php-autoloader(%{gh_owner}/zend-expressive-fastroute) +Suggests: php-autoloader(%{gh_owner}/zend-expressive-zendrouter) %endif -# Autoloader -Requires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -Requires: php-zendframework-zend-loader >= 2.5.1-4 %endif Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} %description @@ -104,15 +102,27 @@ Documentation: http://zend-expressive.readthedocs.io/ mv LICENSE.md LICENSE -: Create dependency autoloader + +%build +: Create dependency autoloader - deprecated cat << 'EOF' | tee autoload.php array( - 'namespaces' => array( - 'ZendTest\\%{library}\\%{sublib}' => dirname(__DIR__).'/test/', - 'Zend\\%{library}\\%{sublib}' => '%{buildroot}%{php_home}/Zend/%{library}/%{sublib}' -)))); -require_once '%{php_home}/Zend/autoload.php'; +require_once '%{buildroot}%{php_home}/Zend/%{library}/%{sublib}/autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\%{sublib}', dirname(__DIR__) . '/test'); EOF ret=0 @@ -156,12 +158,16 @@ exit $ret %license LICENSE %doc *.md %doc composer.json +%dir %{php_home}/Zend %dir %{php_home}/Zend/%{library}/ %{php_home}/Zend/%{library}/%{sublib}/ %{php_home}/Zend/%{library}-%{sublib}-autoload.php %changelog +* Mon Dec 11 2017 Remi Collet - 2.0.0-3 +- switch from zend-loader to fedora/autoloader + * Tue Feb 14 2017 Remi Collet - 2.0.0-1 - update to 2.0.0 -- cgit