From f7b10d56532cc25b220e3a13a502b70cf2bb7ec6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 11 Dec 2017 15:16:22 +0100 Subject: switch from zend-loader to fedora/autoloader --- ...zendframework-zend-expressive-twigrenderer.spec | 76 ++++++++++++---------- 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/php-zendframework-zend-expressive-twigrenderer.spec b/php-zendframework-zend-expressive-twigrenderer.spec index 5d04ad7..a5e779a 100644 --- a/php-zendframework-zend-expressive-twigrenderer.spec +++ b/php-zendframework-zend-expressive-twigrenderer.spec @@ -22,7 +22,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 1.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Twig integration for %{library} Group: Development/Libraries @@ -40,9 +40,9 @@ BuildRequires: php-composer(psr/container) >= 1.0 # test suite fails with v2 BuildRequires: php-composer(twig/twig) < 2 BuildRequires: php-composer(twig/twig) >= 1.32 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-helpers) >= 1.4 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-router) >= 1.3.2 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-template) >= 1.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-helpers) >= 1.4 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 1.3.2 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-template) >= 1.0 BuildRequires: php-pcre BuildRequires: php-spl # From composer, "require-dev": { @@ -55,11 +55,9 @@ BuildRequires: php-spl %global phpunit %{_bindir}/phpunit %endif BuildRequires: %{phpunit} -# 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", @@ -73,12 +71,14 @@ Requires: php-composer(psr/container) >= 1.0 Requires: php-composer(psr/container) < 2 Requires: php-composer(twig/twig) >= 1.32 Requires: php-composer(twig/twig) < 3 -Requires: php-composer(%{gh_owner}/zend-expressive-helpers) >= 1.4 -Requires: php-composer(%{gh_owner}/zend-expressive-helpers) < 5 -Requires: php-composer(%{gh_owner}/zend-expressive-router) >= 1.3.2 -Requires: php-composer(%{gh_owner}/zend-expressive-router) < 3 -Requires: php-composer(%{gh_owner}/zend-expressive-template) >= 1.0.4 -Requires: php-composer(%{gh_owner}/zend-expressive-template) < 2 +Requires: php-autoloader(%{gh_owner}/zend-expressive-helpers) >= 1.4 +Requires: php-autoloader(%{gh_owner}/zend-expressive-helpers) < 5 +Requires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 1.3.2 +Requires: php-autoloader(%{gh_owner}/zend-expressive-router) < 3 +Requires: php-autoloader(%{gh_owner}/zend-expressive-template) >= 1.0.4 +Requires: php-autoloader(%{gh_owner}/zend-expressive-template) < 2 +# Autoloader +Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 1.2.0 Requires: php-pcre Requires: php-spl @@ -88,15 +88,13 @@ Requires: php-spl # "aura/di": "3.0.*@beta to make use of Aura.Di dependency injection container", # "zendframework/zend-servicemanager": "^2.5 to use zend-servicemanager for dependency injection" %if 0%{?fedora} >= 21 -Suggests: php-composer(%{gh_owner}/aura/di) -Suggests: php-composer(%{gh_owner}/zend-servicemanager) +Suggests: php-composer(aura/di) +Suggests: php-autoloader(%{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 Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} %description @@ -110,7 +108,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}\\%{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 @@ -176,6 +183,9 @@ exit $ret %changelog +* Mon Dec 11 2017 Remi Collet - 1.5.0-2 +- switch from zend-loader to fedora/autoloader + * Sun Aug 13 2017 Remi Collet - 1.5.0-1 - Update to 1.5.0 - add dependency on psr/container -- cgit