From 10cc9dcf4eeed9ad129eebae7a4a337522c4dc48 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 16 Jan 2020 11:31:57 +0100 Subject: switch to Laminas --- composer.json | 74 +++++++------ php-laminas-mvc-plugin-flashmessenger.spec | 168 +++++++++++++++++------------ 2 files changed, 140 insertions(+), 102 deletions(-) diff --git a/composer.json b/composer.json index e2fbc26..49939d2 100644 --- a/composer.json +++ b/composer.json @@ -1,60 +1,58 @@ { - "name": "zendframework/zend-mvc-plugin-flashmessenger", - "description": "Plugin for creating and exposing flash messages via zend-mvc controllers", + "name": "laminas/laminas-mvc-plugin-flashmessenger", + "description": "Plugin for creating and exposing flash messages via laminas-mvc controllers", "license": "BSD-3-Clause", "keywords": [ - "zf", - "zendframework", + "laminas", "mvc" ], + "homepage": "https://laminas.dev", "support": { - "docs": "https://docs.zendframework.com/zend-mvc-plugin-flashmessenger/", - "issues": "https://github.com/zendframework/zend-mvc-plugin-flashmessenger/issues", - "source": "https://github.com/zendframework/zend-mvc-plugin-flashmessenger", - "rss": "https://github.com/zendframework/zend-mvc-plugin-flashmessenger/releases.atom", - "chat": "https://zendframework-slack.herokuapp.com", - "forum": "https://discourse.zendframework.com/c/questions/components" + "docs": "https://docs.laminas.dev/laminas-mvc-plugin-flashmessenger/", + "issues": "https://github.com/laminas/laminas-mvc-plugin-flashmessenger/issues", + "source": "https://github.com/laminas/laminas-mvc-plugin-flashmessenger", + "rss": "https://github.com/laminas/laminas-mvc-plugin-flashmessenger/releases.atom", + "chat": "https://laminas.dev/chat", + "forum": "https://discourse.laminas.dev" + }, + "config": { + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" + }, + "laminas": { + "component": "Laminas\\Mvc\\Plugin\\FlashMessenger" + } }, "require": { "php": "^5.6 || ^7.0", - "zendframework/zend-mvc": "^3.0", - "zendframework/zend-session": "^2.8.5", - "zendframework/zend-stdlib": "^3.2.1", - "zendframework/zend-view": "^2.10" + "laminas/laminas-mvc": "^3.0", + "laminas/laminas-session": "^2.8.5", + "laminas/laminas-stdlib": "^3.2.1", + "laminas/laminas-view": "^2.10", + "laminas/laminas-zendframework-bridge": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", - "zendframework/zend-coding-standard": "~1.0.0", - "zendframework/zend-i18n": "^2.8" + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-i18n": "^2.8", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4" }, "conflict": { - "zendframework/zend-mvc": "<3.0.0" + "laminas/laminas-mvc": "<3.0.0" }, "autoload": { "psr-4": { - "Zend\\Mvc\\Plugin\\FlashMessenger\\": "src/" + "Laminas\\Mvc\\Plugin\\FlashMessenger\\": "src/" } }, "autoload-dev": { "psr-4": { - "ZendTest\\Mvc\\Plugin\\FlashMessenger\\": "test/" + "LaminasTest\\Mvc\\Plugin\\FlashMessenger\\": "test/" } }, - "config": { - "sort-packages": true - }, - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" - }, - "zf": { - "component": "Zend\\Mvc\\Plugin\\FlashMessenger" - } - }, - "suggests": { - "zendframework/zend-i18n": "Zend\\I18n component" - }, "scripts": { "check": [ "@cs-check", @@ -64,5 +62,11 @@ "cs-fix": "phpcbf", "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" + }, + "replace": { + "zendframework/zend-mvc-plugin-flashmessenger": "self.version" + }, + "suggests": { + "laminas/laminas-i18n": "Laminas\\I18n component" } } diff --git a/php-laminas-mvc-plugin-flashmessenger.spec b/php-laminas-mvc-plugin-flashmessenger.spec index 69ae432..6d878be 100644 --- a/php-laminas-mvc-plugin-flashmessenger.spec +++ b/php-laminas-mvc-plugin-flashmessenger.spec @@ -1,31 +1,35 @@ -# remirepo/Fedora spec file for php-zendframework-zend-mvc-plugin-flashmessenger +# remirepo/Fedora spec file for php-laminas-mvc-plugin-flashmessenger # -# Copyright (c) 2016-2018 Remi Collet +# Copyright (c) 2016-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 b66064eb59d3b124a133d259aac3d9dd7cb81706 +%global gh_commit f5a522c3aab215a9b89a0630beb91582f4a3f202 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner zendframework -%global gh_project zend-mvc-plugin-flashmessenger +%global gh_owner laminas +%global gh_project laminas-mvc-plugin-flashmessenger +%global zf_name zend-mvc-plugin-flashmessenger %global php_home %{_datadir}/php -%global library FlashMessenger +%global namespace Laminas +%global library Mvc +%global subproj Plugin +%global subsubp FlashMessenger %if %{bootstrap} %global with_tests 0%{?_with_tests:1} %else %global with_tests 0%{!?_without_tests:1} %endif -Name: php-%{gh_owner}-%{gh_project} +Name: php-%{gh_project} Version: 1.2.0 Release: 1%{?dist} -Summary: Zend Framework Mvc-Plugin-%{library} component +Summary: %{namespace} Framework %{library}/%{subproj}/%{subsubp} 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,72 +38,71 @@ BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.6 BuildRequires: php-spl -# From composer, "require-dev": { -# "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", -# "zendframework/zend-coding-standard": "~1.0.0", -# "zendframework/zend-i18n": "^2.8" # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-autoloader(%{gh_owner}/zend-mvc) >= 3.0 with php-autoloader(%{gh_owner}/zend-mvc) < 4) -BuildRequires: (php-autoloader(%{gh_owner}/zend-session) >= 2.8.5 with php-autoloader(%{gh_owner}/zend-session) < 3) -BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4) -BuildRequires: (php-autoloader(%{gh_owner}/zend-view) >= 2.10 with php-autoloader(%{gh_owner}/zend-view) < 3) -BuildRequires: (php-autoloader(%{gh_owner}/zend-i18n) >= 2.8 with php-autoloader(%{gh_owner}/zend-i18n) < 3) -%global phpunit %{_bindir}/phpunit7 -BuildRequires: phpunit7 >= 7.1.4 -# remirepo:14 +BuildRequires: (php-autoloader(%{gh_owner}/laminas-mvc) >= 3.0 with php-autoloader(%{gh_owner}/laminas-mvc) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-session) >= 2.8.5 with php-autoloader(%{gh_owner}/laminas-session) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-view) >= 2.10 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, "require-dev": { +# "laminas/laminas-coding-standard": "~1.0.0", +# "laminas/laminas-i18n": "^2.8", +# "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4" +BuildRequires: (php-autoloader(%{gh_owner}/laminas-i18n) >= 2.8 with php-autoloader(%{gh_owner}/laminas-i18n) < 3) +# remirepo:8 %else -BuildRequires: php-autoloader(%{gh_owner}/zend-mvc) < 4 -BuildRequires: php-autoloader(%{gh_owner}/zend-mvc) >= 3.0 -BuildRequires: php-autoloader(%{gh_owner}/zend-session) < 3 -BuildRequires: php-autoloader(%{gh_owner}/zend-session) >= 2.8.5 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 -BuildRequires: php-autoloader(%{gh_owner}/zend-view) < 3 -BuildRequires: php-autoloader(%{gh_owner}/zend-view) >= 2.10 -BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) < 3 -BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.8 -%global phpunit %{_bindir}/phpunit6 -BuildRequires: phpunit6 >= 6.5.8 +BuildRequires: php-laminas-mvc +BuildRequires: php-laminas-session +BuildRequires: php-laminas-stdlib +BuildRequires: php-laminas-view +BuildRequires: php-laminas-zendframework-bridge +BuildRequires: php-laminas-i18n %endif +%global phpunit %{_bindir}/phpunit7 +BuildRequires: phpunit7 >= 7.1.4 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", -# "zendframework/zend-mvc": "^3.0", -# "zendframework/zend-session": "^2.8.5", -# "zendframework/zend-stdlib": "^3.2.1", -# "zendframework/zend-view": "^2.10" +# "laminas/laminas-mvc": "^3.0", +# "laminas/laminas-session": "^2.8.5", +# "laminas/laminas-stdlib": "^3.2.1", +# "laminas/laminas-view": "^2.10", +# "laminas/laminas-zendframework-bridge": "^1.0" Requires: php(language) >= 5.6 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-autoloader(%{gh_owner}/zend-mvc) >= 3.0 with php-autoloader(%{gh_owner}/zend-mvc) < 4) -Requires: (php-autoloader(%{gh_owner}/zend-session) >= 2.8.5 with php-autoloader(%{gh_owner}/zend-session) < 3) -Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4) -Requires: (php-autoloader(%{gh_owner}/zend-view) >= 2.10 with php-autoloader(%{gh_owner}/zend-view) < 3) -# remirepo:10 +Requires: (php-autoloader(%{gh_owner}/laminas-mvc) >= 3.0 with php-autoloader(%{gh_owner}/laminas-mvc) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-session) >= 2.8.5 with php-autoloader(%{gh_owner}/laminas-session) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-view) >= 2.10 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, "suggests": { +# "laminas/laminas-i18n": "Laminas\\I18n component" +Suggests: php-autoloader(%{gh_owner}/laminas-i18n) +# remirepo:7 %else -Requires: php-autoloader(%{gh_owner}/zend-mvc) < 4 -Requires: php-autoloader(%{gh_owner}/zend-mvc) >= 3.0 -Requires: php-autoloader(%{gh_owner}/zend-session) < 3 -Requires: php-autoloader(%{gh_owner}/zend-session) >= 2.8.5 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 -Requires: php-autoloader(%{gh_owner}/zend-view) < 3 -Requires: php-autoloader(%{gh_owner}/zend-view) >= 2.10 +Requires: php-laminas-mvc +Requires: php-laminas-session +Requires: php-laminas-stdlib +Requires: php-laminas-view +Requires: php-laminas-zendframework-bridge %endif -# From composer, "suggests": { -# "zendframework/zend-i18n": "Zend\\I18n component" -Suggests: php-autoloader(%{gh_owner}/zend-i18n) # Autoloader Requires: php-composer(fedora/autoloader) -# From phpcompatinfo report for version 1.0.0 +# From phpcompatinfo report for version 1.2.0 Requires: php-spl -Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +# Compatibily ensure by the bridge +Obsoletes: php-zendframework-%{zf_name} < 1.2.0-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 @@ -108,11 +111,10 @@ action to the next, after which they are cleared; a typical use case is with Post/Redirect/Get, where they are created in the POST handler, and then displayed by the GET handler to indicate success or failure to the end-user. -This component provides a flash messenger controller plugin for zend-mvc +This component provides a flash messenger controller plugin for laminas-mvc versions 3.0 and up. -* Issues at https://github.com/zendframework/zend-mvc-plugin-flashmessenger/issues -* Documentation is at https://zendframework.github.io/zend-mvc-plugin-flashmessenger/ +Documentation: https://docs.laminas.dev/%{gh_project}/ %prep @@ -126,16 +128,34 @@ mv LICENSE.md LICENSE phpab --template fedora --output src/autoload.php src cat << 'EOF' | tee -a src/autoload.php \Fedora\Autoloader\Dependencies::required([ - '%{php_home}/Zend/Mvc/autoload.php', - '%{php_home}/Zend/Session/autoload.php', - '%{php_home}/Zend/Stdlib/autoload.php', + '%{php_home}/%{namespace}/Mvc/autoload.php', + '%{php_home}/%{namespace}/Session/autoload.php', + '%{php_home}/%{namespace}/Stdlib/autoload.php', + '%{php_home}/%{namespace}/View/autoload.php', +]); +\Fedora\Autoloader\Dependencies::optional([ + '%{php_home}/%{namespace}/I18n/autoload.php', +]); +EOF + +cat << 'EOF' | tee zf.php + - 1.2.0-1 +- switch to Laminas + * Mon Oct 21 2019 Remi Collet - 1.2.0-1 - update to 1.2.0 - raise dependency on zend-stdlib 3.2.1 -- cgit