From 97c4ef81218f1de85bb2cd406e3870bf9b08278e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 25 Mar 2021 14:21:20 +0100 Subject: add patch for PHP 8 from https://github.com/laminas/laminas-mvc-plugin-flashmessenger/pull/11 --- php-laminas-mvc-plugin-flashmessenger-php8.patch | 12 ++++++++++++ php-laminas-mvc-plugin-flashmessenger.spec | 13 ++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 php-laminas-mvc-plugin-flashmessenger-php8.patch diff --git a/php-laminas-mvc-plugin-flashmessenger-php8.patch b/php-laminas-mvc-plugin-flashmessenger-php8.patch new file mode 100644 index 0000000..09ee6f0 --- /dev/null +++ b/php-laminas-mvc-plugin-flashmessenger-php8.patch @@ -0,0 +1,12 @@ +diff -up ./src/View/Helper/FlashMessenger.php.php8 ./src/View/Helper/FlashMessenger.php +--- ./src/View/Helper/FlashMessenger.php.php8 2021-03-25 14:13:31.812239965 +0100 ++++ ./src/View/Helper/FlashMessenger.php 2021-03-25 14:14:00.140131501 +0100 +@@ -332,7 +332,7 @@ class FlashMessenger extends AbstractHel + return $this->escapeHtmlHelper; + } + +- if (method_exists($this->getView(), 'plugin')) { ++ if ($this->getView() && method_exists($this->getView(), 'plugin')) { + $this->escapeHtmlHelper = $this->view->plugin('escapehtml'); + } + diff --git a/php-laminas-mvc-plugin-flashmessenger.spec b/php-laminas-mvc-plugin-flashmessenger.spec index 6d878be..1d68513 100644 --- a/php-laminas-mvc-plugin-flashmessenger.spec +++ b/php-laminas-mvc-plugin-flashmessenger.spec @@ -1,6 +1,6 @@ # remirepo/Fedora spec file for php-laminas-mvc-plugin-flashmessenger # -# Copyright (c) 2016-2020 Remi Collet +# Copyright (c) 2016-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -25,7 +25,7 @@ Name: php-%{gh_project} Version: 1.2.0 -Release: 1%{?dist} +Release: 5%{?dist} Summary: %{namespace} Framework %{library}/%{subproj}/%{subsubp} component License: BSD @@ -33,6 +33,8 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh +Patch0: %{name}-php8.patch + BuildArch: noarch # Tests %if %{with_tests} @@ -119,6 +121,7 @@ Documentation: https://docs.laminas.dev/%{gh_project}/ %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 mv LICENSE.md LICENSE @@ -175,7 +178,7 @@ exit (class_exists("\\Zend\\%{library}\\%{subproj}\\%{subsubp}\\Module") ? 0 : 1 : upstream test suite ret=0 -for cmdarg in "php %{phpunit}" php72 php73 php74; do +for cmdarg in "php %{phpunit}" php73 php74 php80; do if which $cmdarg; then set $cmdarg $1 ${2:-%{_bindir}/phpunit7} --verbose || ret=1 @@ -200,6 +203,10 @@ exit $ret %changelog +* Thu Mar 25 2021 Remi Collet - 1.2.0-5 +- add patch for PHP 8 from + https://github.com/laminas/laminas-mvc-plugin-flashmessenger/pull/11 + * Thu Jan 16 2020 Remi Collet - 1.2.0-1 - switch to Laminas -- cgit