From f2767da8537005df97d16f1eec2ab67141cc5b60 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 11 Dec 2017 16:08:45 +0100 Subject: switch from zend-loader to fedora/autoloader --- php-zendframework-zend-expressive.spec | 102 +++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 43 deletions(-) (limited to 'php-zendframework-zend-expressive.spec') diff --git a/php-zendframework-zend-expressive.spec b/php-zendframework-zend-expressive.spec index 5bd4f88..599e9cd 100644 --- a/php-zendframework-zend-expressive.spec +++ b/php-zendframework-zend-expressive.spec @@ -21,7 +21,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 1.1.1 -Release: 1%{?dist} +Release: 3%{?dist} Summary: PSR-7 Middleware Microframework based on Stratigility Group: Development/Libraries @@ -36,10 +36,10 @@ BuildArch: noarch BuildRequires: php(language) >= 5.6 BuildRequires: php-composer(container-interop/container-interop) >= 1.1 BuildRequires: php-composer(psr/http-message) >= 1.0 -BuildRequires: php-composer(%{gh_owner}/zend-diactoros) >= 1.1 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-router) >= 1.1 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-template) >= 1.0.1 -BuildRequires: php-composer(%{gh_owner}/zend-stratigility) >= 1.3.3 +BuildRequires: php-autoloader(%{gh_owner}/zend-diactoros) >= 1.1 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 1.1 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-template) >= 1.0.1 +BuildRequires: php-autoloader(%{gh_owner}/zend-stratigility) >= 1.3.3 BuildRequires: php-reflection BuildRequires: php-spl # From composer, "require-dev": { @@ -52,17 +52,15 @@ BuildRequires: php-spl # "zendframework/zend-servicemanager": "^2.6", # "malukenho/docheader": "^0.1.5", # "mockery/mockery": "^0.9.5" -BuildRequires: php-composer(phpunit/phpunit) >= 4.7 -# Autoloader -BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-aurarouter) >= 1.0 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-fastroute) >= 1.0 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-zendrouter) >= 1.0 -BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.6 -BuildRequires: php-composer(mockery/mockery) >= 0.9.5 -# For dependencies autoloader -BuildRequires: php-zendframework-zend-loader >= 2.5.1-4 +BuildRequires: php-composer(phpunit/phpunit) >= 4.7 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-aurarouter) >= 1.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-fastroute) >= 1.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-zendrouter) >= 1.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.6 +BuildRequires: php-composer(mockery/mockery) >= 0.9.5 %endif +# Autoloader +BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", @@ -77,14 +75,16 @@ Requires: php-composer(container-interop/container-interop) >= 1.1 Requires: php-composer(container-interop/container-interop) < 2 Requires: php-composer(psr/http-message) >= 1.0 Requires: php-composer(psr/http-message) < 2 -Requires: php-composer(%{gh_owner}/zend-diactoros) >= 1.1 -Requires: php-composer(%{gh_owner}/zend-diactoros) < 2 -Requires: php-composer(%{gh_owner}/zend-expressive-router) >= 1.1 -Requires: php-composer(%{gh_owner}/zend-expressive-router) < 3 -Requires: php-composer(%{gh_owner}/zend-expressive-template) >= 1.0.1 -Requires: php-composer(%{gh_owner}/zend-expressive-template) < 2 -Requires: php-composer(%{gh_owner}/zend-stratigility) >= 1.3.3 -Requires: php-composer(%{gh_owner}/zend-stratigility) < 2 +Requires: php-autoloader(%{gh_owner}/zend-diactoros) >= 1.1 +Requires: php-autoloader(%{gh_owner}/zend-diactoros) < 2 +Requires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 1.1 +Requires: php-autoloader(%{gh_owner}/zend-expressive-router) < 3 +Requires: php-autoloader(%{gh_owner}/zend-expressive-template) >= 1.0.1 +Requires: php-autoloader(%{gh_owner}/zend-expressive-template) < 2 +Requires: php-autoloader(%{gh_owner}/zend-stratigility) >= 1.3.3 +Requires: php-autoloader(%{gh_owner}/zend-stratigility) < 2 +# Autoloader +Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 1.2.0 Requires: php-reflection Requires: php-spl @@ -96,18 +96,18 @@ Requires: php-spl # "xtreamwayz/pimple-container-interop": "^1.0 to use Pimple for dependency injection", # "zendframework/zend-servicemanager": "^2.5 to use zend-servicemanager for dependency injection" %if 0%{?fedora} >= 21 -#Suggests: php-composer(filp/whoops) +#Suggests: php-composer(filp/whoops) Suggests: php-composer(%{gh_owner}/zend-expressive-helpers) Suggests: php-composer(aura/di) -#Suggests: php-composer(xtreamwayz/pimple-container-interop) +#Suggests: php-composer(xtreamwayz/pimple-container-interop) Suggests: php-composer(%{gh_owner}/zend-servicemanager) %endif -# Autoloader -Requires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -Requires: php-zendframework-zend-loader >= 2.5.1-4 %endif +# Autoloader +Requires: php-composer(fedora/autoloader) Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} %description @@ -132,7 +132,9 @@ 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}' => dirname(__DIR__).'/test/', - 'Zend\\%{library}' => '%{buildroot}%{php_home}/Zend/%{library}' -)))); -require_once '%{php_home}/Zend/autoload.php'; -require_once '%{php_home}/Mockery/autoload.php'; +require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php'; +\Fedora\Autoloader\Dependencies::required([ + '%{php_home}/Zend/Expressive/Router/aurarouter-autoload.php', + '%{php_home}/Zend/Expressive/Router/fastroute-autoload.php', + '%{php_home}/Zend/Expressive/Router/zendrouter-autoload.php', + '%{php_home}/Mockery/autoload.php', +]); +\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test'); EOF ret=0 @@ -196,6 +209,9 @@ exit $ret %changelog +* Thu Dec 7 2017 Remi Collet - 1.1.1-3 +- switch from zend-loader to fedora/autoloader + * Tue Feb 14 2017 Remi Collet - 1.1.1-1 - update to 1.1.1 -- cgit