From 1962fdd9c22bdd1b8f545c1e51fcb70a520ae83e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 15 Oct 2018 15:46:31 +0200 Subject: add patch for PHP 7.3 --- php-phpunit-PHPUnit-SkeletonGenerator-php73.patch | 12 ++++++++++++ php-phpunit-PHPUnit-SkeletonGenerator.spec | 14 ++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 php-phpunit-PHPUnit-SkeletonGenerator-php73.patch diff --git a/php-phpunit-PHPUnit-SkeletonGenerator-php73.patch b/php-phpunit-PHPUnit-SkeletonGenerator-php73.patch new file mode 100644 index 0000000..6c8f91b --- /dev/null +++ b/php-phpunit-PHPUnit-SkeletonGenerator-php73.patch @@ -0,0 +1,12 @@ +diff -up ./src/ClassGenerator.php.old ./src/ClassGenerator.php +--- ./src/ClassGenerator.php.old 2018-10-15 15:35:13.940571616 +0200 ++++ ./src/ClassGenerator.php 2018-10-15 15:35:53.886797831 +0200 +@@ -458,7 +458,7 @@ class ClassGenerator extends AbstractGen + $tokens[$i+2] == '&' && + is_array($tokens[$i+3]) && + $tokens[$i+3][0] == T_STRING))) { +- continue; ++ break; + } + + $currentBlock = T_FUNCTION; diff --git a/php-phpunit-PHPUnit-SkeletonGenerator.spec b/php-phpunit-PHPUnit-SkeletonGenerator.spec index d4a6d8e..64fc2e8 100644 --- a/php-phpunit-PHPUnit-SkeletonGenerator.spec +++ b/php-phpunit-PHPUnit-SkeletonGenerator.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-phpunit-PHPUnit-SkeletonGenerator # -# Copyright (c) 2012-2017 Remi Collet +# Copyright (c) 2012-2018 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -17,7 +17,7 @@ Name: php-phpunit-PHPUnit-SkeletonGenerator Version: 2.0.1 -Release: 7%{?dist} +Release: 11%{?dist} Summary: Tool that can generate skeleton test classes Group: Development/Libraries @@ -25,8 +25,10 @@ License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz -# Autoloader for RPM - die composer ! +# Autoloader Patch0: %{name}-rpm.patch +# For PHP 7.3 +Patch1: %{name}-php73.patch BuildArch: noarch BuildRequires: php(language) >= 5.3.3 @@ -80,6 +82,7 @@ and vice versa. %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .rpm +%patch1 -p1 find . -type f -name \*.rpm -delete @@ -115,7 +118,7 @@ require_once '%{php_home}/org/bovigo/vfs/autoload.php'; EOF cd build -for cmd in php php56 php70 php71 php72; do +for cmd in php php56 php70 php71 php72 php73; do if which $cmd; then $cmd %{_bindir}/phpunit --verbose fi @@ -142,6 +145,9 @@ fi %changelog +* Mon Oct 15 2018 Remi Collet - 2.0.1-11 +- add patch for PHP 7.3 + * Thu May 11 2017 Remi Collet - 2.0.1-7 - switch to fedora/autoloader -- cgit