summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-10-15 07:47:10 +0200
committerRemi Collet <remi@remirepo.net>2018-10-15 07:47:10 +0200
commit2aafb8a7849c80ef99cb9f310706e3f18f352e0b (patch)
treec68113278f452105a9aa9149257233cfa4ae19a8
parentc06c37cefc40d1c2d1e88ed892f00a8385478e5e (diff)
add adapted upstream patch for PHP 7.3HEADmaster
-rw-r--r--227f803c33aad0c004f77ca61815ee8e76d94788.patch53
-rw-r--r--php-sebastian-diff2.spec10
2 files changed, 61 insertions, 2 deletions
diff --git a/227f803c33aad0c004f77ca61815ee8e76d94788.patch b/227f803c33aad0c004f77ca61815ee8e76d94788.patch
new file mode 100644
index 0000000..0b20914
--- /dev/null
+++ b/227f803c33aad0c004f77ca61815ee8e76d94788.patch
@@ -0,0 +1,53 @@
+Adapted for 7.3
+
+
+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 --git a/tests/ParserTest.php b/tests/ParserTest.php
+index a3667e3..4a4558d 100644
+--- a/tests/ParserTest.php
++++ b/tests/ParserTest.php
+@@ -74,7 +74,7 @@ final class ParserTest extends TestCase
+
+ public function testParseWithRemovedLines()
+ {
+- $content = <<<A
++ $content = <<<EOF
+ 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;
++EOF;
+ $diffs = $this->parser->parse($content);
+ $this->assertInternalType('array', $diffs);
+ $this->assertContainsOnlyInstancesOf(Diff::class, $diffs);
+@@ -117,7 +117,7 @@ A;
+
+ public function testParseDiffForMulitpleFiles()
+ {
+- $content = <<<A
++ $content = <<<EOF
+ 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;
++EOF;
+ $diffs = $this->parser->parse($content);
+ $this->assertCount(2, $diffs);
+
diff --git a/php-sebastian-diff2.spec b/php-sebastian-diff2.spec
index 82d3f3d..7f58802 100644
--- a/php-sebastian-diff2.spec
+++ b/php-sebastian-diff2.spec
@@ -25,7 +25,7 @@
Name: php-%{pk_vendor}-%{pk_project}%{major}
Version: 2.0.1
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: Diff implementation
Group: Development/Libraries
@@ -33,6 +33,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: https://github.com/sebastianbergmann/diff/commit/227f803c33aad0c004f77ca61815ee8e76d94788.patch
+
BuildArch: noarch
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
@@ -65,6 +67,7 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
%build
@@ -84,7 +87,7 @@ touch vendor/autoload.php
: Run upstream test suite
ret=0
-for cmd in php php70 php71 php72; do
+for cmd in php php70 php71 php72 php73; do
if which $cmd; then
$cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \
%{_bindir}/phpunit6 --verbose || ret=1
@@ -106,6 +109,9 @@ exit $ret
%changelog
+* Mon Oct 15 2018 Remi Collet <remi@remirepo.net> - 2.0.1-4
+- add adapted upstream patch for PHP 7.3
+
* Fri Aug 4 2017 Remi Collet <remi@remirepo.net> - 2.0.1-1
- update to 2.0.1
- renamed to php-sebastian-diff2