diff options
author | Remi Collet <remi@remirepo.net> | 2020-01-16 09:25:34 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-01-16 09:25:34 +0100 |
commit | 62d3acd98812172d0a4fda248c3bad9e78aa0303 (patch) | |
tree | fc401b9e2cea4382b7f8d2656c1ffa2014e106c0 | |
parent | 797c7c59ee91cd9271d4c08771b20f96bf05397d (diff) |
switch to Laminas
use range dependencies
-rw-r--r-- | composer.json | 98 | ||||
-rw-r--r-- | php-laminas-mvc.spec | 314 |
2 files changed, 229 insertions, 183 deletions
diff --git a/composer.json b/composer.json index 4d740ed..3e2137b 100644 --- a/composer.json +++ b/composer.json @@ -1,76 +1,77 @@ { - "name": "zendframework/zend-mvc", - "description": "Zend Framework's event-driven MVC layer, including MVC Applications, Controllers, and Plugins", + "name": "laminas/laminas-mvc", + "description": "Laminas's event-driven MVC layer, including MVC Applications, Controllers, and Plugins", "license": "BSD-3-Clause", "keywords": [ - "zf", - "zendframework", + "laminas", "mvc" ], + "homepage": "https://laminas.dev", "support": { - "docs": "https://docs.zendframework.com/zend-mvc/", - "issues": "https://github.com/zendframework/zend-mvc/issues", - "source": "https://github.com/zendframework/zend-mvc", - "rss": "https://github.com/zendframework/zend-mvc/releases.atom", - "slack": "https://zendframework-slack.herokuapp.com", - "forum": "https://discourse.zendframework.com/c/questions/components" + "docs": "https://docs.laminas.dev/laminas-mvc/", + "issues": "https://github.com/laminas/laminas-mvc/issues", + "source": "https://github.com/laminas/laminas-mvc", + "rss": "https://github.com/laminas/laminas-mvc/releases.atom", + "chat": "https://laminas.dev/chat", + "forum": "https://discourse.laminas.dev" + }, + "config": { + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "3.1-dev", + "dev-develop": "3.2-dev" + } }, "require": { - "container-interop/container-interop": "^1.2", "php": "^5.6 || ^7.0", - "zendframework/zend-eventmanager": "^3.2", - "zendframework/zend-http": "^2.7", - "zendframework/zend-modulemanager": "^2.8", - "zendframework/zend-router": "^3.0.2", - "zendframework/zend-servicemanager": "^3.3", - "zendframework/zend-stdlib": "^3.1", - "zendframework/zend-view": "^2.9" + "container-interop/container-interop": "^1.2", + "laminas/laminas-eventmanager": "^3.2", + "laminas/laminas-http": "^2.7", + "laminas/laminas-modulemanager": "^2.8", + "laminas/laminas-router": "^3.0.2", + "laminas/laminas-servicemanager": "^3.3", + "laminas/laminas-stdlib": "^3.1", + "laminas/laminas-view": "^2.9", + "laminas/laminas-zendframework-bridge": "^1.0" }, "require-dev": { "http-interop/http-middleware": "^0.4.1", - "phpunit/phpunit": "^6.4.4 || ^5.7.14", - "zendframework/zend-coding-standard": "~1.0.0", - "zendframework/zend-json": "^2.6.1 || ^3.0", - "zendframework/zend-psr7bridge": "^1.0", - "zendframework/zend-stratigility": "^2.0.1" + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-json": "^2.6.1 || ^3.0", + "laminas/laminas-psr7bridge": "^1.0", + "laminas/laminas-stratigility": "^2.0.1", + "phpunit/phpunit": "^6.4.4 || ^5.7.14" }, "suggest": { - "zendframework/zend-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable", - "zendframework/zend-log": "^2.9.1 To provide log functionality via LogFilterManager, LogFormatterManager, and LogProcessorManager", - "zendframework/zend-mvc-console": "zend-mvc-console provides the ability to expose zend-mvc as a console application", - "zendframework/zend-mvc-i18n": "zend-mvc-i18n provides integration with zend-i18n, including a translation bridge and translatable route segments", - "zendframework/zend-mvc-plugin-fileprg": "To provide Post/Redirect/Get functionality around forms that container file uploads", - "zendframework/zend-mvc-plugin-flashmessenger": "To provide flash messaging capabilities between requests", - "zendframework/zend-mvc-plugin-identity": "To access the authenticated identity (per zend-authentication) in controllers", - "zendframework/zend-mvc-plugin-prg": "To provide Post/Redirect/Get functionality within controllers", - "zendframework/zend-paginator": "^2.7 To provide pagination functionality via PaginatorPluginManager", - "zendframework/zend-psr7bridge": "(^0.2) To consume PSR-7 middleware within the MVC workflow", - "zendframework/zend-servicemanager-di": "zend-servicemanager-di provides utilities for integrating zend-di and zend-servicemanager in your zend-mvc application", - "zendframework/zend-stratigility": "zend-stratigility is required to use middleware pipes in the MiddlewareListener", - "http-interop/http-middleware": "^0.4.1 to be used together with zend-stratigility" + "http-interop/http-middleware": "^0.4.1 to be used together with laminas-stratigility", + "laminas/laminas-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable", + "laminas/laminas-log": "^2.9.1 To provide log functionality via LogFilterManager, LogFormatterManager, and LogProcessorManager", + "laminas/laminas-mvc-console": "laminas-mvc-console provides the ability to expose laminas-mvc as a console application", + "laminas/laminas-mvc-i18n": "laminas-mvc-i18n provides integration with laminas-i18n, including a translation bridge and translatable route segments", + "laminas/laminas-mvc-plugin-fileprg": "To provide Post/Redirect/Get functionality around forms that container file uploads", + "laminas/laminas-mvc-plugin-flashmessenger": "To provide flash messaging capabilities between requests", + "laminas/laminas-mvc-plugin-identity": "To access the authenticated identity (per laminas-authentication) in controllers", + "laminas/laminas-mvc-plugin-prg": "To provide Post/Redirect/Get functionality within controllers", + "laminas/laminas-paginator": "^2.7 To provide pagination functionality via PaginatorPluginManager", + "laminas/laminas-psr7bridge": "(^0.2) To consume PSR-7 middleware within the MVC workflow", + "laminas/laminas-servicemanager-di": "laminas-servicemanager-di provides utilities for integrating laminas-di and laminas-servicemanager in your laminas-mvc application", + "laminas/laminas-stratigility": "laminas-stratigility is required to use middleware pipes in the MiddlewareListener" }, "autoload": { "psr-4": { - "Zend\\Mvc\\": "src/" + "Laminas\\Mvc\\": "src/" } }, "autoload-dev": { "psr-4": { - "ZendTest\\Mvc\\": "test/" + "LaminasTest\\Mvc\\": "test/" }, "files": [ "test/_autoload.php" ] }, - "config": { - "sort-packages": true - }, - "extra": { - "branch-alias": { - "dev-master": "3.1-dev", - "dev-develop": "3.2-dev" - } - }, "scripts": { "check": [ "@cs-check", @@ -81,5 +82,8 @@ "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml", "upload-coverage": "coveralls -v" + }, + "replace": { + "zendframework/zend-mvc": "self.version" } } diff --git a/php-laminas-mvc.spec b/php-laminas-mvc.spec index 19321e1..3ad5e40 100644 --- a/php-laminas-mvc.spec +++ b/php-laminas-mvc.spec @@ -1,17 +1,19 @@ -# remirepo/Fedora spec file for php-zendframework-zend-mvc +# remirepo/Fedora spec file for php-laminas-mvc # -# Copyright (c) 2015-2018 Remi Collet +# Copyright (c) 2015-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 236e7e1e3757e988fa06530c0a3f96a148858ae8 +%global gh_commit ead09f8ab5ff0e562dbd0198c7f67523c2f61980 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner zendframework -%global gh_project zend-mvc +%global gh_owner laminas +%global gh_project laminas-mvc +%global zf_name zend-mvc %global php_home %{_datadir}/php +%global namespace Laminas %global library Mvc %if %{bootstrap} %global with_tests 0%{?_with_tests:1} @@ -19,13 +21,13 @@ %global with_tests 0%{!?_without_tests:1} %endif -Name: php-%{gh_owner}-%{gh_project} +Name: php-%{gh_project} Version: 3.1.1 -Release: 2%{?dist} -Summary: Zend Framework %{library} component +Release: 1%{?dist} +Summary: %{namespace} Framework %{library} component License: BSD -URL: https://zendframework.github.io/%{gh_project}/ +URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh @@ -34,127 +36,151 @@ BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.6 BuildRequires: php-reflection -BuildRequires: php-intl +BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-spl -BuildRequires: php-composer(container-interop/container-interop) >= 1.2 -BuildRequires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 3.2 -BuildRequires: php-autoloader(%{gh_owner}/zend-http) >= 2.7 -BuildRequires: php-autoloader(%{gh_owner}/zend-modulemanager) >= 2.8 -BuildRequires: php-autoloader(%{gh_owner}/zend-router) >= 3.0.2 -BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 3.3 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 -BuildRequires: php-autoloader(%{gh_owner}/zend-view) >= 2.9 -# From composer, "require-dev": { +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/laminas-eventmanager) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.7 with php-autoloader(%{gh_owner}/laminas-http) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-modulemanager) >= 2.8 with php-autoloader(%{gh_owner}/laminas-modulemanager) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-router) >= 3.0.2 with php-autoloader(%{gh_owner}/laminas-router) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.3 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-view) >= 2.9 with php-autoloader(%{gh_owner}/laminas-view) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) +# from composer.json, "require-dev": { # "http-interop/http-middleware": "^0.4.1", -# "phpunit/phpunit": "^6.4.4 || ^5.7.14", -# "zendframework/zend-coding-standard": "~1.0.0", -# "zendframework/zend-json": "^2.6.1 || ^3.0", -# "zendframework/zend-psr7bridge": "^1.0", -# "zendframework/zend-stratigility": "^2.0.1" -BuildRequires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 -# ignore min version as we don't test stratigility 2.0.1" -BuildRequires: php-autoloader(%{gh_owner}/zend-psr7bridge) >= 0.2 -# ignore min version (and skip test relying on it) -BuildRequires: php-autoloader(%{gh_owner}/zend-stratigility) -%if 0%{?fedora} >= 26 -%global phpunit %{_bindir}/phpunit6 +# "laminas/laminas-coding-standard": "~1.0.0", +# "laminas/laminas-json": "^2.6.1 || ^3.0", +# "laminas/laminas-psr7bridge": "^1.0", +# "laminas/laminas-stratigility": "^2.0.1", +# "phpunit/phpunit": "^6.4.4 || ^5.7.14" +BuildRequires: (php-composer(http-interop/http-middleware) >= 0.4.1 with php-composer(http-interop/http-middleware) < 1) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-json) >= 3.0 with php-autoloader(%{gh_owner}/laminas-json) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-psr7bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-psr7bridge) < 2) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-stratigility) >= 2.0.1 with php-autoloader(%{gh_owner}/laminas-stratigility) < 3) +# remirepo:11 %else -%global phpunit %{_bindir}/phpunit +BuildRequires: php-container-interop +BuildRequires: php-laminas-eventmanager +BuildRequires: php-laminas-http +BuildRequires: php-laminas-modulemanager +BuildRequires: php-laminas-router +BuildRequires: php-laminas-servicemanager +BuildRequires: php-laminas-stdlib +BuildRequires: php-laminas-view +BuildRequires: php-laminas-zendframework-bridge +BuildRequires: php-http-interop-http-middleware +BuildRequires: php-laminas-json +BuildRequires: php-laminas-psr7bridge +BuildRequires: php-laminas-stratigility %endif -BuildRequires: %{phpunit} +%global phpunit %{_bindir}/phpunit6 +BuildRequires: phpunit6 >= 6.5 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # From composer, "require": { -# "container-interop/container-interop": "^1.2", # "php": "^5.6 || ^7.0", -# "zendframework/zend-eventmanager": "^3.2", -# "zendframework/zend-http": "^2.7", -# "zendframework/zend-modulemanager": "^2.8", -# "zendframework/zend-router": "^3.0.2", -# "zendframework/zend-servicemanager": "^3.3", -# "zendframework/zend-stdlib": "^3.1", -# "zendframework/zend-view": "^2.9" +# "container-interop/container-interop": "^1.2", +# "laminas/laminas-eventmanager": "^3.2", +# "laminas/laminas-http": "^2.7", +# "laminas/laminas-modulemanager": "^2.8", +# "laminas/laminas-router": "^3.0.2", +# "laminas/laminas-servicemanager": "^3.3", +# "laminas/laminas-stdlib": "^3.1", +# "laminas/laminas-view": "^2.9", +# "laminas/laminas-zendframework-bridge": "^1.0" Requires: php(language) >= 5.6 -%if ! %{bootstrap} -Requires: php-composer(container-interop/container-interop) >= 1.2 -Requires: php-composer(container-interop/container-interop) < 2 -Requires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 3.2 -Requires: php-autoloader(%{gh_owner}/zend-eventmanager) < 4 -Requires: php-autoloader(%{gh_owner}/zend-http) >= 2.7 -Requires: php-autoloader(%{gh_owner}/zend-http) < 3 -Requires: php-autoloader(%{gh_owner}/zend-modulemanager) >= 2.8 -Requires: php-autoloader(%{gh_owner}/zend-modulemanager) < 3 -Requires: php-autoloader(%{gh_owner}/zend-router) >= 3.0.2 -Requires: php-autoloader(%{gh_owner}/zend-router) < 4 -Requires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 3.3 -Requires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -Requires: php-autoloader(%{gh_owner}/zend-view) >= 2.9 -Requires: php-autoloader(%{gh_owner}/zend-view) < 3 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2) +Requires: (php-autoloader(%{gh_owner}/laminas-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/laminas-eventmanager) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.7 with php-autoloader(%{gh_owner}/laminas-http) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-modulemanager) >= 2.8 with php-autoloader(%{gh_owner}/laminas-modulemanager) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-router) >= 3.0.2 with php-autoloader(%{gh_owner}/laminas-router) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.3 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-view) >= 2.9 with php-autoloader(%{gh_owner}/laminas-view) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) # From composer, "suggest": { -# "zendframework/zend-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable", -# "zendframework/zend-log": "^2.9.1 To provide log functionality via LogFilterManager, LogFormatterManager, and LogProcessorManager", -# "zendframework/zend-mvc-console": "zend-mvc-console provides the ability to expose zend-mvc as a console application", -# "zendframework/zend-mvc-i18n": "zend-mvc-i18n provides integration with zend-i18n, including a translation bridge and translatable route segments", -# "zendframework/zend-mvc-plugin-fileprg": "To provide Post/Redirect/Get functionality around forms that container file uploads", -# "zendframework/zend-mvc-plugin-flashmessenger": "To provide flash messaging capabilities between requests", -# "zendframework/zend-mvc-plugin-identity": "To access the authenticated identity (per zend-authentication) in controllers", -# "zendframework/zend-mvc-plugin-prg": "To provide Post/Redirect/Get functionality within controllers", -# "zendframework/zend-paginator": "^2.7 To provide pagination functionality via PaginatorPluginManager", -# "zendframework/zend-psr7bridge": "(^0.2) To consume PSR-7 middleware within the MVC workflow", -# "zendframework/zend-servicemanager-di": "zend-servicemanager-di provides utilities for integrating zend-di and zend-servicemanager in your zend-mvc application", -# "zendframework/zend-stratigility": "zend-stratigility is required to use middleware pipes in the MiddlewareListener", -# "http-interop/http-middleware": "^0.4.1 to be used together with zend-stratigility" -%if 0%{?fedora} >= 21 -Suggests: php-autoloader(%{gh_owner}/zend-json) -Suggests: php-autoloader(%{gh_owner}/zend-log) -Suggests: php-autoloader(%{gh_owner}/zend-mvc-console) -Suggests: php-autoloader(%{gh_owner}/zend-mvc-i18n) -Suggests: php-autoloader(%{gh_owner}/zend-mvc-plugin-fileprg) -Suggests: php-autoloader(%{gh_owner}/zend-mvc-plugin-flashmessenger) -Suggests: php-autoloader(%{gh_owner}/zend-mvc-plugin-identity) -Suggests: php-autoloader(%{gh_owner}/zend-mvc-plugin-prg) -Suggests: php-autoloader(%{gh_owner}/zend-paginator) -Suggests: php-autoloader(%{gh_owner}/zend-psr7bridge) -Suggests: php-autoloader(%{gh_owner}/zend-servicemanager-di) -Suggests: php-autoloader(%{gh_owner}/zend-stratigility) -%endif +# "http-interop/http-middleware": "^0.4.1 to be used together with laminas-stratigility", +# "laminas/laminas-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable", +# "laminas/laminas-log": "^2.9.1 To provide log functionality via LogFilterManager, LogFormatterManager, and LogProcessorManager", +# "laminas/laminas-mvc-console": "laminas-mvc-console provides the ability to expose laminas-mvc as a console application", +# "laminas/laminas-mvc-i18n": "laminas-mvc-i18n provides integration with laminas-i18n, including a translation bridge and translatable route segments", +# "laminas/laminas-mvc-plugin-fileprg": "To provide Post/Redirect/Get functionality around forms that container file uploads", +# "laminas/laminas-mvc-plugin-flashmessenger": "To provide flash messaging capabilities between requests", +# "laminas/laminas-mvc-plugin-identity": "To access the authenticated identity (per laminas-authentication) in controllers", +# "laminas/laminas-mvc-plugin-prg": "To provide Post/Redirect/Get functionality within controllers", +# "laminas/laminas-paginator": "^2.7 To provide pagination functionality via PaginatorPluginManager", +# "laminas/laminas-psr7bridge": "(^0.2) To consume PSR-7 middleware within the MVC workflow", +# "laminas/laminas-servicemanager-di": "laminas-servicemanager-di provides utilities for integrating laminas-di and laminas-servicemanager in your laminas-mvc application", +# "laminas/laminas-stratigility": "laminas-stratigility is required to use middleware pipes in the MiddlewareListener" +Suggests: php-composer(http-interop/http-middleware) +Suggests: php-autoloader(%{gh_owner}/laminas-json) +Suggests: php-autoloader(%{gh_owner}/laminas-log) +Suggests: php-autoloader(%{gh_owner}/laminas-mvc-console) +Suggests: php-autoloader(%{gh_owner}/laminas-mvc-i18n) +Suggests: php-autoloader(%{gh_owner}/laminas-mvc-plugin-fileprg) +Suggests: php-autoloader(%{gh_owner}/laminas-mvc-plugin-flashmessenger) +Suggests: php-autoloader(%{gh_owner}/laminas-mvc-plugin-identity) +Suggests: php-autoloader(%{gh_owner}/laminas-mvc-plugin-prg) +Suggests: php-autoloader(%{gh_owner}/laminas-paginator) +Suggests: php-autoloader(%{gh_owner}/laminas-psr7bridge) +Suggests: php-autoloader(%{gh_owner}/laminas-servicemanager-di) +Suggests: php-autoloader(%{gh_owner}/laminas-stratigility) +# remirepo:11 +%else +Requires: php-container-interop +Requires: php-laminas-eventmanager +Requires: php-laminas-http +Requires: php-laminas-modulemanager +Requires: php-laminas-router +Requires: php-laminas-servicemanager +Requires: php-laminas-stdlib +Requires: php-laminas-view +Requires: php-laminas-zendframework-bridge %endif # Autoloader Requires: php-composer(fedora/autoloader) -# From phpcompatinfo report for version 2.7.0 +# From phpcompatinfo report for version 3.1.1 Requires: php-reflection -Requires: php-intl +Requires: php-json Requires: php-pcre Requires: php-spl -Obsoletes: php-ZendFramework2-%{library} < 2.5 -Provides: php-ZendFramework2-%{library} = %{version} -Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Obsoletes: php-ZendFramework2-%{library} < 2.5 +Provides: php-ZendFramework2-%{library} = %{version} +# Compatibily ensure by the bridge +Obsoletes: php-zendframework-%{zf_name} < 3.1.1-99 +Provides: php-zendframework-%{zf_name} = %{version}-99 +Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-composer(zendframework/%{zf_name}) = %{version} Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(zendframework/%{zf_name}) = %{version} %description -Zend\Mvc is a brand new MVC implementation designed from the ground up -for Zend Framework 2, focusing on performance and flexibility. +%{namespace}\Mvc is a brand new MVC implementation designed from the ground up +for %{namespace} Framework, focusing on performance and flexibility. The MVC layer is built on top of the following components: -* Zend\ServiceManager - Zend Framework provides a set of default service - definitions set up at Zend\Mvc\Service. The ServiceManager creates and +* %{namespace}\ServiceManager - %{namespace} Framework provides a set of default service + definitions set up at %{namespace}\Mvc\Service. The ServiceManager creates and configures your application instance and workflow. -* Zend\EventManager - The MVC is event driven. This component is used +* %{namespace}\EventManager - The MVC is event driven. This component is used everywhere from initial bootstrapping of the application, through returning response and request calls, to setting and retrieving routes and matched routes, as well as render views. -* Zend\Http - specifically the request and response objects, used within: - Zend\Stdlib\DispatchableInterface. All “controllers” are simply dispatchable - objects. +* %{namespace}\Http - specifically the request and response objects, used within: + %{namespace}\Stdlib\DispatchableInterface. All “controllers” are simply + dispatchable objects. -Documentation: https://zendframework.github.io/%{gh_project}/ +Documentation: https://docs.laminas.dev/%{gh_project}/ %prep @@ -164,67 +190,78 @@ mv LICENSE.md LICENSE %build -: Create dependency autoloader - deprecated -cat << 'EOF' | tee autoload.php -<?php -require_once '%{php_home}/Interop/Container/autoload.php'; -EOF - : Create autoloader phpab --template fedora --output src/autoload.php src cat << 'EOF' | tee -a src/autoload.php \Fedora\Autoloader\Dependencies::required([ '%{php_home}/Interop/Container/autoload.php', - '%{php_home}/Zend/EventManager/autoload.php', - '%{php_home}/Zend/Http/autoload.php', - '%{php_home}/Zend/ModuleManager/autoload.php', - '%{php_home}/Zend/Router/autoload.php', - '%{php_home}/Zend/ServiceManager/autoload.php', - '%{php_home}/Zend/Stdlib/autoload.php', - '%{php_home}/Zend/View/autoload.php', + '%{php_home}/%{namespace}/EventManager/autoload.php', + '%{php_home}/%{namespace}/Http/autoload.php', + '%{php_home}/%{namespace}/ModuleManager/autoload.php', + '%{php_home}/%{namespace}/Router/autoload.php', + '%{php_home}/%{namespace}/ServiceManager/autoload.php', + '%{php_home}/%{namespace}/Stdlib/autoload.php', + '%{php_home}/%{namespace}/View/autoload.php', ]); \Fedora\Autoloader\Dependencies::optional([ - '%{php_home}/Zend/Json/autoload.php', - '%{php_home}/Zend/Log/autoload.php', - '%{php_home}/Zend/Mvc/Console/autoload.php', - '%{php_home}/Zend/Mvc/I18n/autoload.php', - '%{php_home}/Zend/Mvc/Plugin/FilePrg/autoload.php', - '%{php_home}/Zend/Mvc/Plugin/FlashMessenger/autoload.php', - '%{php_home}/Zend/Mvc/Plugin/Identity/autoload.php', - '%{php_home}/Zend/Mvc/Plugin/Prg/autoload.php', - '%{php_home}/Zend/Paginator/autoload.php', - '%{php_home}/Zend/Psr7Bridge/autoload.php', - '%{php_home}/Zend/ServiceManager/Di/autoload.php', - '%{php_home}/Zend/Stratigility/autoload.php', + '%{php_home}/%{namespace}/Json/autoload.php', + '%{php_home}/%{namespace}/Log/autoload.php', + '%{php_home}/%{namespace}/Mvc/Console/autoload.php', + '%{php_home}/%{namespace}/Mvc/I18n/autoload.php', + '%{php_home}/%{namespace}/Mvc/Plugin/FilePrg/autoload.php', + '%{php_home}/%{namespace}/Mvc/Plugin/FlashMessenger/autoload.php', + '%{php_home}/%{namespace}/Mvc/Plugin/Identity/autoload.php', + '%{php_home}/%{namespace}/Mvc/Plugin/Prg/autoload.php', + '%{php_home}/%{namespace}/Paginator/autoload.php', + '%{php_home}/%{namespace}/Psr7Bridge/autoload.php', + '%{php_home}/%{namespace}/ServiceManager/Di/autoload.php', + '%{php_home}/%{namespace}/Stratigility/autoload.php', '%{php_home}/Interop/Http/Middleware/autoload.php', ]); EOF +cat << 'EOF' | tee zf.php +<?php +require_once '%{php_home}/Fedora/Autoloader/autoload.php'; +\Fedora\Autoloader\Dependencies::required([ + '%{php_home}/%{namespace}/ZendFrameworkBridge/autoload.php', + dirname(dirname(__DIR__)) . '/%{namespace}/%{library}/autoload.php', + ]); +EOF + %install -rm -rf %{buildroot} +: Laminas library +mkdir -p %{buildroot}%{php_home}/%{namespace}/ +cp -pr src %{buildroot}%{php_home}/%{namespace}/%{library} -mkdir -p %{buildroot}%{php_home}/Zend/ -cp -pr src %{buildroot}%{php_home}/Zend/%{library} - -install -m644 autoload.php %{buildroot}%{php_home}/Zend/%{library}-autoload.php +: Zend equiv +mkdir -p %{buildroot}%{php_home}/Zend/%{library} +cp -pr zf.php %{buildroot}%{php_home}/Zend/%{library}/autoload.php %check %if %{with_tests} -# Skip test relying on statigility 2.0.1 -rm test/MiddlewareListenerTest.php - mkdir vendor cat << 'EOF' | tee vendor/autoload.php <?php -require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php'; -\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test'); +require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('%{namespace}Test\\%{library}\\', dirname(__DIR__) . '/test'); require_once 'test/_autoload.php'; EOF +: check compat autoloader +php -r ' +require "%{buildroot}%{php_home}/Zend/%{library}/autoload.php"; +exit (class_exists("\\Zend\\%{library}\\Application") ? 0 : 1); +' + +: Skip test which raise deprecation warning - stratigility +rm test/MiddlewareListenerTest.php + +: upstream test suite ret=0 -for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do +for cmdarg in "php %{phpunit}" php72 php73 php74; do if which $cmdarg; then set $cmdarg $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1 @@ -237,15 +274,20 @@ exit $ret %files +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md %doc composer.json %{php_home}/Zend/%{library} -%{php_home}/Zend/%{library}-autoload.php +%{php_home}/%{namespace}/%{library} %changelog +* Wed Jan 15 2020 Remi Collet <remi@remirepo.net> - 2.12.0-1 +- switch to Laminas +- use range dependencies + * Tue Dec 12 2017 Remi Collet <remi@remirepo.net> - 3.1.1-2 - switch from zend-loader to fedora/autoloader |