summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--165.patch41
-rw-r--r--php-ast.spec9
2 files changed, 49 insertions, 1 deletions
diff --git a/165.patch b/165.patch
new file mode 100644
index 0000000..aa0ee41
--- /dev/null
+++ b/165.patch
@@ -0,0 +1,41 @@
+From f3523b85992ac1803294882e320c1111d0b9e055 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 17 Jul 2020 11:14:25 +0200
+Subject: [PATCH] relax tests for 8.0 master
+
+---
+ tests/parse_code_parse_error.phpt | 4 ++--
+ tests/parse_file_parse_error.phpt | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/parse_code_parse_error.phpt b/tests/parse_code_parse_error.phpt
+index 57504cf..d82c043 100644
+--- a/tests/parse_code_parse_error.phpt
++++ b/tests/parse_code_parse_error.phpt
+@@ -18,11 +18,11 @@ try {
+
+ ?>
+ --EXPECTF--
+-ParseError: syntax error, unexpected '&', expecting end of file in string code:1
++ParseError: syntax error, unexpected %s&%s expecting end of file in string code:1
+ Stack trace:
+ #0 %s(%d): ast\parse_code('%s', %d)
+ #1 {main}
+-ParseError: syntax error, unexpected '&', expecting end of file in file.php:1
++ParseError: syntax error, unexpected %s&%s expecting end of file in file.php:1
+ Stack trace:
+ #0 %s(%d): ast\parse_code('%s', %d, 'file.php')
+ #1 {main}
+diff --git a/tests/parse_file_parse_error.phpt b/tests/parse_file_parse_error.phpt
+index 88c0678..8e4a003 100644
+--- a/tests/parse_file_parse_error.phpt
++++ b/tests/parse_file_parse_error.phpt
+@@ -11,7 +11,7 @@ try {
+
+ ?>
+ --EXPECTF--
+-ParseError: syntax error, unexpected ')' in %stests/invalid_file.php:3
++ParseError: syntax error, unexpected %s)%s in %stests/invalid_file.php:3
+ Stack trace:
+ #0 %s(%d): ast\parse_file('%s', %d)
+ #1 {main}
diff --git a/php-ast.spec b/php-ast.spec
index 20ec01b..a5bc4ea 100644
--- a/php-ast.spec
+++ b/php-ast.spec
@@ -24,7 +24,7 @@ Version: 1.0.7
%if 0%{?gh_date:1}
Release: 0.6.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%endif
License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
@@ -34,6 +34,8 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
%endif
+Patch0: https://patch-diff.githubusercontent.com/raw/nikic/php-ast/pull/165.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-pear
@@ -103,6 +105,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .pr165
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_AST_VERSION/{s/.* "//;s/".*$//;p}' php_ast.h)
@@ -232,6 +235,10 @@ fi
%changelog
+* Tue Jul 21 2020 Remi Collet <remi@remirepo.net> - 1.0.7-2
+- add patch from https://github.com/nikic/php-ast/pull/165
+ relax tests for 8.0.0alpha3
+
* Sun Jul 12 2020 Remi Collet <remi@remirepo.net> - 1.0.7-1
- update to 1.0.7