From 47fec4af1024dcb53ca0e09788ac54fbaea2877c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 9 Dec 2017 09:19:38 +0100 Subject: switch from zend-loader to fedora/autoloader --- php-zendframework-zend-stratigility.spec | 57 +++++++++++++++++--------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/php-zendframework-zend-stratigility.spec b/php-zendframework-zend-stratigility.spec index 608f75d..97af6db 100644 --- a/php-zendframework-zend-stratigility.spec +++ b/php-zendframework-zend-stratigility.spec @@ -21,7 +21,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 1.3.3 -Release: 1%{?dist} +Release: 4%{?dist} Summary: Middleware for PHP Group: Development/Libraries @@ -35,7 +35,7 @@ BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.6 BuildRequires: php-composer(psr/http-message) >= 1.0 -BuildRequires: php-composer(%{gh_owner}/zend-escaper) >= 2.3 +BuildRequires: php-autoloader(%{gh_owner}/zend-escaper) >= 2.3 BuildRequires: php-composer(http-interop/http-middleware) >= 0.2 BuildRequires: php-pcre BuildRequires: php-reflection @@ -44,13 +44,11 @@ BuildRequires: php-spl # "zendframework/zend-diactoros": "^1.0", # "phpunit/phpunit": "^5.6", # "zendframework/zend-coding-standard": "~1.0.0" -BuildRequires: php-composer(%{gh_owner}/zend-diactoros) >= 1.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-diactoros) >= 1.0 BuildRequires: php-composer(phpunit/phpunit) >= 5.6 -# 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", @@ -60,23 +58,23 @@ BuildRequires: php-zendframework-zend-loader >= 2.5.1-4 Requires: php(language) >= 5.6 Requires: php-composer(psr/http-message) >= 1.0 Requires: php-composer(psr/http-message) < 2 -Requires: php-composer(%{gh_owner}/zend-escaper) >= 2.3 -Requires: php-composer(%{gh_owner}/zend-escaper) < 3 +Requires: php-autoloader(%{gh_owner}/zend-escaper) >= 2.3 +Requires: php-autoloader(%{gh_owner}/zend-escaper) < 3 Requires: php-composer(http-interop/http-middleware) >= 0.2 # From composer, "suggest": { # "psr/http-message-implementation": "Please install a psr/http-message-implementation to consume Stratigility; e.g., zendframework/zend-diactoros" %if 0%{?fedora} >= 21 -Suggests: php-composer(%{gh_owner}/zend-diactoros) +Suggests: php-autoloader(%{gh_owner}/zend-diactoros) %endif +# Autoloader +Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 2.7.4 Requires: php-pcre Requires: php-reflection Requires: php-spl -# Autoloader -Requires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -Requires: php-zendframework-zend-loader >= 2.5.1-4 Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} %description @@ -97,15 +95,25 @@ It allows you to create and dispatch middleware pipelines. 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 '%{buildroot}%{php_home}/Zend/%{library}/autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test'); EOF ret=0 @@ -154,6 +154,9 @@ exit $ret %changelog +* Sat Dec 9 2017 Remi Collet - 1.3.3-4 +- switch from zend-loader to fedora/autoloader + * Tue Jan 24 2017 Remi Collet - 1.3.3-1 - update to 1.3.3 -- cgit