diff options
-rw-r--r-- | 17.patch | 32 | ||||
-rw-r--r-- | php-pecl-parle.spec | 12 |
2 files changed, 41 insertions, 3 deletions
diff --git a/17.patch b/17.patch new file mode 100644 index 0000000..d1ee9e9 --- /dev/null +++ b/17.patch @@ -0,0 +1,32 @@ +From 0ef52b050a7110b16e0e992bc4d89c3e0b99a7b0 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 23 Aug 2019 14:59:00 +0200 +Subject: [PATCH] fix Function ReflectionType::__toString() is deprecated is + 7.4 + +--- + tests/reflection_001.phpt | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/reflection_001.phpt b/tests/reflection_001.phpt +index c38e9ec..34f2f68 100644 +--- a/tests/reflection_001.phpt ++++ b/tests/reflection_001.phpt +@@ -6,13 +6,13 @@ return type in arg info + <?php + + $r = new ReflectionMethod("Parle\\Lexer", "getToken"); +-var_dump((string)$r->getReturnType()); ++var_dump(PHP_VERSION_ID >= 70100 ? $r->getReturnType()->getName() : (string)$r->getReturnType()); + $r = new ReflectionMethod("Parle\\RLexer", "getToken"); +-var_dump((string)$r->getReturnType()); ++var_dump(PHP_VERSION_ID >= 70100 ? $r->getReturnType()->getName() : (string)$r->getReturnType()); + $r = new ReflectionMethod("Parle\\Parser", "errorInfo"); +-var_dump((string)$r->getReturnType()); ++var_dump(PHP_VERSION_ID >= 70100 ? $r->getReturnType()->getName() : (string)$r->getReturnType()); + $r = new ReflectionMethod("Parle\\RParser", "errorInfo"); +-var_dump((string)$r->getReturnType()); ++var_dump(PHP_VERSION_ID >= 70100 ? $r->getReturnType()->getName() : (string)$r->getReturnType()); + + ?> + ==DONE== diff --git a/php-pecl-parle.spec b/php-pecl-parle.spec index b351a1c..0a9d7ef 100644 --- a/php-pecl-parle.spec +++ b/php-pecl-parle.spec @@ -31,13 +31,14 @@ BuildRequires: devtoolset-6-toolchain Summary: Parsing and lexing Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 0.8.1 -Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # Extension is BSD, libraries are Boost License: BSD and Boost URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz Patch0: https://github.com/weltling/parle/commit/7c692b9880aa6a501b6627d923bbc8ed1da1465f.patch +Patch1: https://patch-diff.githubusercontent.com/raw/weltling/parle/pull/17.patch BuildRequires: %{?scl_prefix}php-devel >= 7 BuildRequires: %{?scl_prefix}php-pear @@ -120,6 +121,7 @@ mv NTS/lib/parsertl14/parsertl/licence_1_0.txt NTS/LICENSE.parsertl14 cd NTS %patch0 -p1 -b .up +%patch1 -p1 -b .pr17 # Sanity check, really often broken extver=$(sed -n '/#define PHP_PARLE_VERSION/{s/.* "//;s/".*$//;p}' php_parle.h) @@ -198,7 +200,7 @@ cd NTS %if %{with_tests} : Upstream test suite -make test +make test "TESTS=--show-diff" %endif %if %{with_zts} @@ -210,7 +212,7 @@ cd ../ZTS %if %{with_tests} : Upstream test suite -make test +make test "TESTS=--show-diff" %endif %endif @@ -250,6 +252,10 @@ fi %changelog +* Fri Aug 23 2019 Remi Collet <remi@remirepo.net> - 0.8.1-7 +- add patch for 7.4 from + https://github.com/weltling/parle/pull/17 + * Tue Jun 4 2019 Remi Collet <remi@remirepo.net> - 0.8.1-6 - add upstream patch for 7.4 |