summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-10-15 07:58:27 +0200
committerRemi Collet <remi@remirepo.net>2018-10-15 07:58:27 +0200
commit56d0d4c947857c1ec3a083235f478bb230f5d84c (patch)
treeedbe0852bbab804e7876fef80fbcdc840b1e3f2f
parentcf7dcd2b80aa04c3c3194483818ea0a77b406dd3 (diff)
add adapted upstream patch for PHP 7.3HEADmaster
-rw-r--r--227f803c33aad0c004f77ca61815ee8e76d94788.patch52
-rw-r--r--php-phpunit-diff.spec10
2 files changed, 60 insertions, 2 deletions
diff --git a/227f803c33aad0c004f77ca61815ee8e76d94788.patch b/227f803c33aad0c004f77ca61815ee8e76d94788.patch
new file mode 100644
index 0000000..c9a726a
--- /dev/null
+++ b/227f803c33aad0c004f77ca61815ee8e76d94788.patch
@@ -0,0 +1,52 @@
+Adapted for version 1 from
+
+
+From 227f803c33aad0c004f77ca61815ee8e76d94788 Mon Sep 17 00:00:00 2001
+From: Sebastian Bergmann <sb@sebastian-bergmann.de>
+Date: Mon, 28 May 2018 15:38:20 +0200
+Subject: [PATCH] Make this code compatible with PHP 7.3.
+
+See https://externals.io/message/102147 for details.
+---
+ tests/ParserTest.php | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff -up tests/ParserTest.php.old tests/ParserTest.php
+--- a/tests/ParserTest.php.old 2017-05-22 09:24:03.000000000 +0200
++++ b/tests/ParserTest.php 2018-10-15 07:54:39.422740416 +0200
+@@ -74,7 +74,7 @@ class ParserTest extends TestCase
+
+ public function testParseWithRemovedLines()
+ {
+- $content = <<<A
++ $content = <<<END
+ diff --git a/Test.txt b/Test.txt
+ index abcdefg..abcdefh 100644
+ --- a/Test.txt
+@@ -82,7 +82,7 @@ index abcdefg..abcdefh 100644
+ @@ -49,9 +49,8 @@
+ A
+ -B
+-A;
++END;
+ $diffs = $this->parser->parse($content);
+ $this->assertInternalType('array', $diffs);
+ $this->assertContainsOnlyInstancesOf('SebastianBergmann\Diff\Diff', $diffs);
+@@ -117,7 +117,7 @@ A;
+
+ public function testParseDiffForMulitpleFiles()
+ {
+- $content = <<<A
++ $content = <<<END
+ diff --git a/Test.txt b/Test.txt
+ index abcdefg..abcdefh 100644
+ --- a/Test.txt
+@@ -133,7 +133,7 @@ index abcdefg..abcdefh 100644
+ @@ -1,2 +1,3 @@
+ A
+ +B
+-A;
++END;
+ $diffs = $this->parser->parse($content);
+ $this->assertCount(2, $diffs);
+
diff --git a/php-phpunit-diff.spec b/php-phpunit-diff.spec
index e794ee6..fd2a28c 100644
--- a/php-phpunit-diff.spec
+++ b/php-phpunit-diff.spec
@@ -22,7 +22,7 @@
Name: php-phpunit-diff
Version: 1.4.3
-Release: 3%{?dist}
+Release: 6%{?dist}
Summary: Diff implementation
Group: Development/Libraries
@@ -30,6 +30,8 @@ License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
+Patch0: 227f803c33aad0c004f77ca61815ee8e76d94788.patch
+
BuildArch: noarch
BuildRequires: php(language) >= 5.3.3
BuildRequires: php-fedora-autoloader-devel
@@ -65,6 +67,7 @@ Diff implementation.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1 -b .old
%build
@@ -82,7 +85,7 @@ cp -pr src %{buildroot}%{php_home}/SebastianBergmann/Diff
%if %{with_tests}
%check
ret=0
-for cmd in php %{?rhel:php54 php55} php56 php70 php71 php72; do
+for cmd in php %{?rhel:php54 php55} php56 php70 php71 php72 php73; do
if which $cmd; then
$cmd -d include_path=.:%{buildroot}%{php_home}:%{php_home}:%{_datadir}/pear \
-d auto_prepend_file=%{buildroot}%{php_home}/SebastianBergmann/Diff/autoload.php \
@@ -112,6 +115,9 @@ fi
%changelog
+* Mon Oct 15 2018 Remi Collet <remi@remirepo.net> - 1.4.3-6
+- add adapted upstream patch for PHP 7.3
+
* Sat Aug 12 2017 Remi Collet <remi@remirepo.net> - 1.4.3-3
- don't use phpunit6 which requires diff v2, FTBFS from Koschei