summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-09-24 11:54:57 +0200
committerRemi Collet <remi@remirepo.net>2018-09-24 11:54:57 +0200
commit04b4612a81bf026e75fa8efbf3c04accd08aa799 (patch)
tree45cf6713b47b69f2f4330d90f19ba83375c6ead6
parenta32bde1056ec4680aa5aad33269449e034467c1d (diff)
add patch to fix test with 7.3
-rw-r--r--1212.patch31
-rw-r--r--php-phpspec.spec3
2 files changed, 34 insertions, 0 deletions
diff --git a/1212.patch b/1212.patch
new file mode 100644
index 0000000..fe6faae
--- /dev/null
+++ b/1212.patch
@@ -0,0 +1,31 @@
+From badef9f195cb982f9fa6567923e95bd659733510 Mon Sep 17 00:00:00 2001
+From: Ciaran McNulty <mail@ciaranmcnulty.com>
+Date: Sat, 4 Aug 2018 12:21:36 +0100
+Subject: [PATCH 1/2] PHP 7.3 support
+
+---
+ .travis.yml | 1 +
+ CHANGES-v5.md | 4 ++++
+ composer.json | 2 +-
+ spec/PhpSpec/Matcher/IterateLikeMatcherSpec.php | 6 +-----
+ 4 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/spec/PhpSpec/Matcher/IterateLikeMatcherSpec.php b/spec/PhpSpec/Matcher/IterateLikeMatcherSpec.php
+index 7fb80638..4a36c0b4 100644
+--- a/spec/PhpSpec/Matcher/IterateLikeMatcherSpec.php
++++ b/spec/PhpSpec/Matcher/IterateLikeMatcherSpec.php
+@@ -68,11 +68,7 @@ function it_does_not_positive_match_generator_while_not_iterating_the_same()
+ $second->foo = 'bar';
+
+ $this
+- ->shouldThrow(new SubjectElementDoesNotMatchException(0, '"0"', '"stdClass::__set_state(array(
+- \'foo\' => \'foo\',
+-))"', '"0"', '"stdClass::__set_state(array(
+- \'foo\' => \'bar\',
+-))"'))
++ ->shouldThrow(SubjectElementDoesNotMatchException::class)
+ ->during('positiveMatch', [
+ 'iterateLike',
+ $this->createGeneratorReturningArray([$first]),
+
+
diff --git a/php-phpspec.spec b/php-phpspec.spec
index 5996d4c..c473cad 100644
--- a/php-phpspec.spec
+++ b/php-phpspec.spec
@@ -37,6 +37,8 @@ Source1: %{gh_project}-autoload.php
# Use our autoloader
Patch0: %{gh_project}-4-rpm.patch
+# From https://github.com/phpspec/phpspec/pull/1212
+Patch1: 1212.patch
BuildArch: noarch
BuildRequires: php(language) >= 7.1
@@ -131,6 +133,7 @@ refactor this code.
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p0 -b .rpm
+%patch1 -p1
sed -e 's/@SYMFONY@/%{symfony_ns}/' \
%{SOURCE1} > src/PhpSpec/autoload.php