From b632f5d9cf24f5a5e2509a80e9e0555c207af2c2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 12 Dec 2017 17:25:37 +0100 Subject: switch from zend-loader to fedora/autoloader --- php-zendframework-zend-mvc-console.spec | 118 ++++++++++++++++++-------------- 1 file changed, 66 insertions(+), 52 deletions(-) diff --git a/php-zendframework-zend-mvc-console.spec b/php-zendframework-zend-mvc-console.spec index 7c513da..48bc81f 100644 --- a/php-zendframework-zend-mvc-console.spec +++ b/php-zendframework-zend-mvc-console.spec @@ -21,7 +21,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 1.1.11 -Release: 1%{?dist} +Release: 4%{?dist} Summary: Zend Framework Mvc-%{library} component Group: Development/Libraries @@ -35,15 +35,15 @@ BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.6 BuildRequires: php-composer(container-interop/container-interop) >= 1.1 -BuildRequires: php-composer(%{gh_owner}/zend-console) >= 2.6 -BuildRequires: php-composer(%{gh_owner}/zend-eventmanager) >= 2.6.2 -BuildRequires: php-composer(%{gh_owner}/zend-modulemanager) >= 2.7.1 -BuildRequires: php-composer(%{gh_owner}/zend-mvc) >= 3.0.3 -BuildRequires: php-composer(%{gh_owner}/zend-router) >= 3.0 -BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5 -BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7.5 -BuildRequires: php-composer(%{gh_owner}/zend-text) >= 2.6 -BuildRequires: php-composer(%{gh_owner}/zend-view) >= 2.6.3 +BuildRequires: php-autoloader(%{gh_owner}/zend-console) >= 2.6 +BuildRequires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.2 +BuildRequires: php-autoloader(%{gh_owner}/zend-modulemanager) >= 2.7.1 +BuildRequires: php-autoloader(%{gh_owner}/zend-mvc) >= 3.0.3 +BuildRequires: php-autoloader(%{gh_owner}/zend-router) >= 3.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5 +BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7.5 +BuildRequires: php-autoloader(%{gh_owner}/zend-text) >= 2.6 +BuildRequires: php-autoloader(%{gh_owner}/zend-view) >= 2.6.3 BuildRequires: php-spl # From composer, "require-dev": { # "squizlabs/php_codesniffer": "^2.3.1", @@ -51,13 +51,11 @@ BuildRequires: php-spl # "zendframework/zend-filter": "^2.6.1", # "zendframework/zend-form": "^2.7" BuildRequires: php-composer(phpunit/phpunit) >= 4.5 -BuildRequires: php-composer(%{gh_owner}/zend-filter) >= 2.6.1 -BuildRequires: php-composer(%{gh_owner}/zend-form) >= 2.7 -# Autoloader -BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -# For dependencies autoloader -BuildRequires: php-zendframework-zend-loader >= 2.5.1-3 +BuildRequires: php-autoloader(%{gh_owner}/zend-filter) >= 2.6.1 +BuildRequires: php-autoloader(%{gh_owner}/zend-form) >= 2.7 %endif +# Autoloader +BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", @@ -74,38 +72,38 @@ BuildRequires: php-zendframework-zend-loader >= 2.5.1-3 Requires: php(language) >= 5.6 Requires: php-composer(container-interop/container-interop) >= 1.1 Requires: php-composer(container-interop/container-interop) < 2 -Requires: php-composer(%{gh_owner}/zend-console) >= 2.6 -Requires: php-composer(%{gh_owner}/zend-console) < 3 -Requires: php-composer(%{gh_owner}/zend-eventmanager) >= 2.6.2 -Requires: php-composer(%{gh_owner}/zend-eventmanager) < 4 -Requires: php-composer(%{gh_owner}/zend-modulemanager) >= 2.7.1 -Requires: php-composer(%{gh_owner}/zend-modulemanager) < 3 -Requires: php-composer(%{gh_owner}/zend-mvc) >= 3.0.3 -Requires: php-composer(%{gh_owner}/zend-mvc) < 4 -Requires: php-composer(%{gh_owner}/zend-router) >= 3.0 -Requires: php-composer(%{gh_owner}/zend-router) < 4 -Requires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5 -Requires: php-composer(%{gh_owner}/zend-servicemanager) < 4 -Requires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7.5 -Requires: php-composer(%{gh_owner}/zend-stdlib) < 4 -Requires: php-composer(%{gh_owner}/zend-text) >= 2.6 -Requires: php-composer(%{gh_owner}/zend-text) < 3 -Requires: php-composer(%{gh_owner}/zend-view) >= 2.6.3 -Requires: php-composer(%{gh_owner}/zend-view) < 3 +Requires: php-autoloader(%{gh_owner}/zend-console) >= 2.6 +Requires: php-autoloader(%{gh_owner}/zend-console) < 3 +Requires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.2 +Requires: php-autoloader(%{gh_owner}/zend-eventmanager) < 4 +Requires: php-autoloader(%{gh_owner}/zend-modulemanager) >= 2.7.1 +Requires: php-autoloader(%{gh_owner}/zend-modulemanager) < 3 +Requires: php-autoloader(%{gh_owner}/zend-mvc) >= 3.0.3 +Requires: php-autoloader(%{gh_owner}/zend-mvc) < 4 +Requires: php-autoloader(%{gh_owner}/zend-router) >= 3.0 +Requires: php-autoloader(%{gh_owner}/zend-router) < 4 +Requires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5 +Requires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4 +Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7.5 +Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 +Requires: php-autoloader(%{gh_owner}/zend-text) >= 2.6 +Requires: php-autoloader(%{gh_owner}/zend-text) < 3 +Requires: php-autoloader(%{gh_owner}/zend-view) >= 2.6.3 +Requires: php-autoloader(%{gh_owner}/zend-view) < 3 +# Autoloader +Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 1.1.10 Requires: php-spl %if ! %{bootstrap} # From composer, "suggest": { # "zendframework/zend-filter": "^2.6.1, to filter rendered results" %if 0%{?fedora} >= 21 -Suggests: php-composer(%{gh_owner}/zend-json-filter) +Suggests: php-composer(%{gh_owner}/zend-filter) %endif -# Autoloader -Requires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -Requires: php-zendframework-zend-loader >= 2.5.1-3 %endif Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} %description @@ -128,15 +126,33 @@ three components. mv LICENSE.md LICENSE -: Create dependency autoloader + +%build +: Create dependency autoloader - deprecated cat << 'EOF' | tee autoload.php array( - 'namespaces' => array( - 'ZendTest\\Mvc\\%{library}' => dirname(__DIR__).'/test/', - 'Zend\\Mvc\\%{library}' => '%{buildroot}%{php_home}/Zend/Mvc/%{library}' -)))); -require_once '%{php_home}/Zend/autoload.php'; +require_once '%{buildroot}%{php_home}/Zend/Mvc/%{library}/autoload.php'; +\Fedora\Autoloader\Dependencies::required([ + '%{php_home}/Zend/Form/autoload.php', +]); +\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\Mvc\\%{library}\\', dirname(__DIR__) . '/test'); EOF ret=0 @@ -185,6 +196,9 @@ exit $ret %changelog +* Tue Dec 12 2017 Remi Collet - 1.1.11-4 +- switch from zend-loader to fedora/autoloader + * Thu Dec 15 2016 Remi Collet - 1.1.11-1 - update to 1.1.11 - raise dependency on zendframework/zend-mvc 3.0.3 -- cgit