From 44764854eccf64c163b5de16a6eea0ddb00adfb7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 11 Feb 2019 14:50:03 +0100 Subject: [PATCH 1/4] v1.2.1 (cherry picked from commit 487f0cf56e88f254391b24532edeee1f2630b2e1) --- .gitignore | 1 + php-mockery.spec | 14 ++++++++------ sources | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 80a7d32..c830540 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ clog /php-mockery-1.1.0-99e29d3.tar.gz /php-mockery-1.2.0-1006336.tar.gz +/php-mockery-1.2.1-dc4f10b.tar.gz diff --git a/php-mockery.spec b/php-mockery.spec index 71c8615..abdedd7 100644 --- a/php-mockery.spec +++ b/php-mockery.spec @@ -6,7 +6,7 @@ # # Please preserve changelog entries # -%global gh_commit 100633629bf76d57430b86b7098cd6beb996a35a +%global gh_commit dc4f10b6b1148744facb784015e4b339d7feec23 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mockery %global gh_project mockery @@ -15,11 +15,10 @@ %global with_tests 0%{!?_without_tests:1} Name: php-mockery -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Mockery is a simple but flexible PHP mock object framework -Group: Development/Libraries 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 @@ -31,7 +30,7 @@ BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.6.0 # From composer.json, "require-dev": { -# "phpunit/phpunit": "~5.7.10|~6.5|~7.0" +# "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" %global phpunit %{_bindir}/phpunit7 BuildRequires: phpunit7 BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0 with php-composer(hamcrest/hamcrest-php) < 3) @@ -99,7 +98,7 @@ phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tes : Run upstream test suite ret=0 -for cmd in "php %{phpunit}" "php70 %{_bindir}/phpunit6" php71 php72 php73; do +for cmd in "php %{phpunit}" "php70 %{_bindir}/phpunit6" "php71 %{_bindir}/phpunit7" php72 php73; do if which $cmd; then set $cmd # see .travis.yml @@ -107,7 +106,7 @@ for cmd in "php %{phpunit}" "php70 %{_bindir}/phpunit6" php71 php72 php73; do then SUITE="Mockery Test Suite PHP56" else SUITE="Mockery Test Suite" fi - $1 ${2:-%{_bindir}/phpunit7} \ + $1 ${2:-%{_bindir}/phpunit8} \ --no-coverage \ --verbose --testsuite="$SUITE" fi @@ -125,6 +124,9 @@ exit $ret %changelog +* Mon Feb 11 2019 Remi Collet - 1.2.1-1 +- update to 1.2.1 + * Wed Oct 3 2018 Remi Collet - 1.2.0-1 - update to 1.2.0 - switch to phpunit7 diff --git a/sources b/sources index c9e07af..72315bf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-mockery-1.2.0-1006336.tar.gz) = 8ea9934d2cc5a60c22ddb10fab8dc13a7fc6d4a9b93d100f46b52629057cac69a0f5a8ee6c2470dbd30f14c01544f3bca31e0b003a47296bc4dc02042b5c9330 +SHA512 (php-mockery-1.2.1-dc4f10b.tar.gz) = 8e1e887008a3bff4e0c376fcc1303de3ab91ff9bb4ef51393c7a1dfa46a4f3b256e531b94b48b1d55bae29406b49eebfe6d94574b04b8b9e1ca50ad7347518c4 From 03e05ab290045c2ef0c43803f84c2a9a34f68efb Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 13 Feb 2019 13:33:26 +0100 Subject: [PATCH 2/4] v1.2.2 (cherry picked from commit 3ec6e0ac3d1ddb66cc229b89c2d680ba89d5e2bf) --- .gitignore | 1 + php-mockery.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c830540..24e9725 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ clog /php-mockery-1.1.0-99e29d3.tar.gz /php-mockery-1.2.0-1006336.tar.gz /php-mockery-1.2.1-dc4f10b.tar.gz +/php-mockery-1.2.2-0eb0b48.tar.gz diff --git a/php-mockery.spec b/php-mockery.spec index abdedd7..beed64e 100644 --- a/php-mockery.spec +++ b/php-mockery.spec @@ -6,7 +6,7 @@ # # Please preserve changelog entries # -%global gh_commit dc4f10b6b1148744facb784015e4b339d7feec23 +%global gh_commit 0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mockery %global gh_project mockery @@ -15,7 +15,7 @@ %global with_tests 0%{!?_without_tests:1} Name: php-mockery -Version: 1.2.1 +Version: 1.2.2 Release: 1%{?dist} Summary: Mockery is a simple but flexible PHP mock object framework @@ -124,6 +124,9 @@ exit $ret %changelog +* Wed Feb 13 2019 Remi Collet - 1.2.2-1 +- update to 1.2.2 + * Mon Feb 11 2019 Remi Collet - 1.2.1-1 - update to 1.2.1 diff --git a/sources b/sources index 72315bf..0868798 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-mockery-1.2.1-dc4f10b.tar.gz) = 8e1e887008a3bff4e0c376fcc1303de3ab91ff9bb4ef51393c7a1dfa46a4f3b256e531b94b48b1d55bae29406b49eebfe6d94574b04b8b9e1ca50ad7347518c4 +SHA512 (php-mockery-1.2.2-0eb0b48.tar.gz) = 99c8648cd016e60ad96105d3306c549cbee83047d70510b977a70566c7282f28c5fa7c81e3eadd28b14915e9e92e0e7bf2034667cb7cbf08fae1dc7fca12d9dc From aaf05d093adf422b19b06c568178af7ae07ac52f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 22 Aug 2019 09:17:04 +0200 Subject: [PATCH 3/4] update to 1.2.3 add patch for PHP 7.4 from https://github.com/mockery/mockery/pull/993 (cherry picked from commit 16fa4dc0455f415436e39b4cd57a0bc93ecf6e8d) (cherry picked from commit 76f3a5464f3c10158d3d965f92a42ec72a142be5) --- .gitignore | 1 + 993.patch | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ php-mockery.spec | 16 +++++++++--- sources | 2 +- 4 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 993.patch diff --git a/.gitignore b/.gitignore index 24e9725..ca2f3c3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ clog /php-mockery-1.2.0-1006336.tar.gz /php-mockery-1.2.1-dc4f10b.tar.gz /php-mockery-1.2.2-0eb0b48.tar.gz +/php-mockery-1.2.3-4eff936.tar.gz diff --git a/993.patch b/993.patch new file mode 100644 index 0000000..1248e23 --- /dev/null +++ b/993.patch @@ -0,0 +1,66 @@ +From 077d174cf14ea2951dd49d9a3b8f1e5ae0309b89 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 19 Aug 2019 17:10:08 +0200 +Subject: [PATCH 1/2] don't use is_real which is deprecated in 7.4 + +--- + library/Mockery/Matcher/Type.php | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/library/Mockery/Matcher/Type.php b/library/Mockery/Matcher/Type.php +index dc189ab0..d81ce834 100644 +--- a/library/Mockery/Matcher/Type.php ++++ b/library/Mockery/Matcher/Type.php +@@ -30,7 +30,11 @@ class Type extends MatcherAbstract + */ + public function match(&$actual) + { +- $function = 'is_' . strtolower($this->_expected); ++ if ($this->_expected == 'real') { ++ $function = 'is_float'; ++ } else { ++ $function = 'is_' . strtolower($this->_expected); ++ } + if (function_exists($function)) { + return $function($actual); + } elseif (is_string($this->_expected) + +From b06f129832b21f4ba70dd52cd0221cf8dc623bd1 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 19 Aug 2019 17:13:17 +0200 +Subject: [PATCH 2/2] real => float in test suite + +--- + tests/Mockery/ExpectationTest.php | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/Mockery/ExpectationTest.php b/tests/Mockery/ExpectationTest.php +index e718015d..13774bfa 100644 +--- a/tests/Mockery/ExpectationTest.php ++++ b/tests/Mockery/ExpectationTest.php +@@ -1276,14 +1276,14 @@ public function testObjectConstraintThrowsExceptionWhenConstraintUnmatched() + + public function testRealConstraintMatchesArgument() + { +- $this->mock->shouldReceive('foo')->with(Mockery::type('real'))->once(); ++ $this->mock->shouldReceive('foo')->with(Mockery::type('float'))->once(); + $this->mock->foo(2.25); + } + + public function testRealConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); +- $this->mock->shouldReceive('foo')->with(1, Mockery::type('real'))->never(); ++ $this->mock->shouldReceive('foo')->with(1, Mockery::type('float'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); +@@ -1291,7 +1291,7 @@ public function testRealConstraintNonMatchingCase() + + public function testRealConstraintThrowsExceptionWhenConstraintUnmatched() + { +- $this->mock->shouldReceive('foo')->with(Mockery::type('real')); ++ $this->mock->shouldReceive('foo')->with(Mockery::type('float')); + $this->expectException(\Mockery\Exception::class); + $this->mock->foo('f'); + Mockery::close(); diff --git a/php-mockery.spec b/php-mockery.spec index beed64e..c6e5c3b 100644 --- a/php-mockery.spec +++ b/php-mockery.spec @@ -6,7 +6,7 @@ # # Please preserve changelog entries # -%global gh_commit 0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2 +%global gh_commit 4eff936d83eb809bde2c57a3cea0ee9643769031 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mockery %global gh_project mockery @@ -15,7 +15,7 @@ %global with_tests 0%{!?_without_tests:1} Name: php-mockery -Version: 1.2.2 +Version: 1.2.3 Release: 1%{?dist} Summary: Mockery is a simple but flexible PHP mock object framework @@ -25,6 +25,8 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Use our autoloader Patch0: %{gh_project}-tests.patch +# For 7.4 +Patch1: https://patch-diff.githubusercontent.com/raw/mockery/mockery/pull/993.patch BuildArch: noarch %if %{with_tests} @@ -76,6 +78,7 @@ cat << 'EOF' | tee -a library/%{ns_project}/autoload.php EOF %patch0 -p0 -b .rpm +%patch1 -p1 rm -f docs/.gitignore @@ -98,7 +101,7 @@ phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tes : Run upstream test suite ret=0 -for cmd in "php %{phpunit}" "php70 %{_bindir}/phpunit6" "php71 %{_bindir}/phpunit7" php72 php73; do +for cmd in "php %{phpunit}" "php71 %{_bindir}/phpunit7" php72 php73 php74; do if which $cmd; then set $cmd # see .travis.yml @@ -108,7 +111,7 @@ for cmd in "php %{phpunit}" "php70 %{_bindir}/phpunit6" "php71 %{_bindir}/phpuni fi $1 ${2:-%{_bindir}/phpunit8} \ --no-coverage \ - --verbose --testsuite="$SUITE" + --verbose --testsuite="$SUITE" || ret=1 fi done exit $ret @@ -124,6 +127,11 @@ exit $ret %changelog +* Mon Aug 19 2019 Remi Collet - 1.2.3-1 +- update to 1.2.3 +- add patch for PHP 7.4 from + https://github.com/mockery/mockery/pull/993 + * Wed Feb 13 2019 Remi Collet - 1.2.2-1 - update to 1.2.2 diff --git a/sources b/sources index 0868798..d50b3e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-mockery-1.2.2-0eb0b48.tar.gz) = 99c8648cd016e60ad96105d3306c549cbee83047d70510b977a70566c7282f28c5fa7c81e3eadd28b14915e9e92e0e7bf2034667cb7cbf08fae1dc7fca12d9dc +SHA512 (php-mockery-1.2.3-4eff936.tar.gz) = 7512e7d5550f49b6938b11bcdbf740db276abfbd735d9355e838105e8761786889a85c3d0bb55ec90d6fd386a98b292d050a9f1365b230e0513451a4e33dd784 From 7b8a0c7351ace229222b6f2e11c3ae812ef4d041 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 30 Sep 2019 11:43:19 +0200 Subject: [PATCH 4/4] update to 1.2.4 drop patch merged upstream (cherry picked from commit 71076982f2594571ae3750b62b141031c884cf00) --- .gitignore | 1 + 993.patch | 66 ------------------------------------------------ php-mockery.spec | 11 ++++---- sources | 2 +- 4 files changed, 8 insertions(+), 72 deletions(-) delete mode 100644 993.patch diff --git a/.gitignore b/.gitignore index ca2f3c3..1f5083a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ clog /php-mockery-1.2.1-dc4f10b.tar.gz /php-mockery-1.2.2-0eb0b48.tar.gz /php-mockery-1.2.3-4eff936.tar.gz +/php-mockery-1.2.4-b3453f7.tar.gz diff --git a/993.patch b/993.patch deleted file mode 100644 index 1248e23..0000000 --- a/993.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 077d174cf14ea2951dd49d9a3b8f1e5ae0309b89 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Mon, 19 Aug 2019 17:10:08 +0200 -Subject: [PATCH 1/2] don't use is_real which is deprecated in 7.4 - ---- - library/Mockery/Matcher/Type.php | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/library/Mockery/Matcher/Type.php b/library/Mockery/Matcher/Type.php -index dc189ab0..d81ce834 100644 ---- a/library/Mockery/Matcher/Type.php -+++ b/library/Mockery/Matcher/Type.php -@@ -30,7 +30,11 @@ class Type extends MatcherAbstract - */ - public function match(&$actual) - { -- $function = 'is_' . strtolower($this->_expected); -+ if ($this->_expected == 'real') { -+ $function = 'is_float'; -+ } else { -+ $function = 'is_' . strtolower($this->_expected); -+ } - if (function_exists($function)) { - return $function($actual); - } elseif (is_string($this->_expected) - -From b06f129832b21f4ba70dd52cd0221cf8dc623bd1 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Mon, 19 Aug 2019 17:13:17 +0200 -Subject: [PATCH 2/2] real => float in test suite - ---- - tests/Mockery/ExpectationTest.php | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests/Mockery/ExpectationTest.php b/tests/Mockery/ExpectationTest.php -index e718015d..13774bfa 100644 ---- a/tests/Mockery/ExpectationTest.php -+++ b/tests/Mockery/ExpectationTest.php -@@ -1276,14 +1276,14 @@ public function testObjectConstraintThrowsExceptionWhenConstraintUnmatched() - - public function testRealConstraintMatchesArgument() - { -- $this->mock->shouldReceive('foo')->with(Mockery::type('real'))->once(); -+ $this->mock->shouldReceive('foo')->with(Mockery::type('float'))->once(); - $this->mock->foo(2.25); - } - - public function testRealConstraintNonMatchingCase() - { - $this->mock->shouldReceive('foo')->times(3); -- $this->mock->shouldReceive('foo')->with(1, Mockery::type('real'))->never(); -+ $this->mock->shouldReceive('foo')->with(1, Mockery::type('float'))->never(); - $this->mock->foo(); - $this->mock->foo(1); - $this->mock->foo(1, 2, 3); -@@ -1291,7 +1291,7 @@ public function testRealConstraintNonMatchingCase() - - public function testRealConstraintThrowsExceptionWhenConstraintUnmatched() - { -- $this->mock->shouldReceive('foo')->with(Mockery::type('real')); -+ $this->mock->shouldReceive('foo')->with(Mockery::type('float')); - $this->expectException(\Mockery\Exception::class); - $this->mock->foo('f'); - Mockery::close(); diff --git a/php-mockery.spec b/php-mockery.spec index c6e5c3b..bb3c958 100644 --- a/php-mockery.spec +++ b/php-mockery.spec @@ -6,7 +6,7 @@ # # Please preserve changelog entries # -%global gh_commit 4eff936d83eb809bde2c57a3cea0ee9643769031 +%global gh_commit b3453f75fd23d9fd41685f2148f4abeacabc6405 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mockery %global gh_project mockery @@ -15,7 +15,7 @@ %global with_tests 0%{!?_without_tests:1} Name: php-mockery -Version: 1.2.3 +Version: 1.2.4 Release: 1%{?dist} Summary: Mockery is a simple but flexible PHP mock object framework @@ -25,8 +25,6 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Use our autoloader Patch0: %{gh_project}-tests.patch -# For 7.4 -Patch1: https://patch-diff.githubusercontent.com/raw/mockery/mockery/pull/993.patch BuildArch: noarch %if %{with_tests} @@ -78,7 +76,6 @@ cat << 'EOF' | tee -a library/%{ns_project}/autoload.php EOF %patch0 -p0 -b .rpm -%patch1 -p1 rm -f docs/.gitignore @@ -127,6 +124,10 @@ exit $ret %changelog +* Mon Sep 30 2019 Remi Collet - 1.2.4-1 +- update to 1.2.4 +- drop patch merged upstream + * Mon Aug 19 2019 Remi Collet - 1.2.3-1 - update to 1.2.3 - add patch for PHP 7.4 from diff --git a/sources b/sources index d50b3e8..871af22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-mockery-1.2.3-4eff936.tar.gz) = 7512e7d5550f49b6938b11bcdbf740db276abfbd735d9355e838105e8761786889a85c3d0bb55ec90d6fd386a98b292d050a9f1365b230e0513451a4e33dd784 +SHA512 (php-mockery-1.2.4-b3453f7.tar.gz) = b22f4727e404a874849e5fbff270cd786b4a9dc813a5c2d43d789d83ba7957ee8b9adeb44c62639219929c63170349d784293011f7a421941f7613e255d0b71a