summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-07-07 15:43:52 +0200
committerRemi Collet <fedora@famillecollet.com>2014-07-07 15:43:52 +0200
commit4f21f84fd44c57466c93cada5322c2e2ab8a2bbd (patch)
treebcd317371337a06f1013237284a4b7a939303aef
parentd210f36ca7272332f0503d649b99fcebf22656c1 (diff)
php-phpunit-PHPUnit-MockObject: 2.1.5
-rw-r--r--php-phpunit-PHPUnit-MockObject.spec11
-rw-r--r--phpunit-mock-objects-pr176.patch82
2 files changed, 5 insertions, 88 deletions
diff --git a/php-phpunit-PHPUnit-MockObject.spec b/php-phpunit-PHPUnit-MockObject.spec
index 7ecc2c1..2bd11ba 100644
--- a/php-phpunit-PHPUnit-MockObject.spec
+++ b/php-phpunit-PHPUnit-MockObject.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 1a894a16b6c15fcdc5ef2b110f0e6233952c9b0f
+%global gh_commit 7878b9c41edb3afab92b85edf5f0981014a2713a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project phpunit-mock-objects
@@ -17,7 +17,7 @@
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
Name: php-phpunit-PHPUnit-MockObject
-Version: 2.1.4
+Version: 2.1.5
Release: 1%{?dist}
Summary: Mock Object library for PHPUnit
@@ -32,9 +32,6 @@ Source1: Autoload.php.in
# Temporary workaround, under investigation
Patch0: %{gh_project}-rpm.patch
-# https://github.com/sebastianbergmann/phpunit-mock-objects/pull/176
-Patch1: %{gh_project}-pr176.patch
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: %{_bindir}/phpab
@@ -63,7 +60,6 @@ Mock Object library for PHPUnit
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1
-%patch1 -p1
find . -name \*.orig -exec rm {} \; -print
@@ -112,6 +108,9 @@ fi
%changelog
+* Mon Jul 07 2014 Remi Collet <remi@fedoraproject.org> - 2.1.5-1
+- update to 2.1.5
+
* Thu Jun 12 2014 Remi Collet <remi@fedoraproject.org> - 2.1.4-1
- update to 2.1.4
- add upstream patch to fix unserialize issue
diff --git a/phpunit-mock-objects-pr176.patch b/phpunit-mock-objects-pr176.patch
deleted file mode 100644
index d13d836..0000000
--- a/phpunit-mock-objects-pr176.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From b49bdba40387a897d91ce24735437a8f2feab86e Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora@famillecollet.com>
-Date: Thu, 12 Jun 2014 09:03:05 +0200
-Subject: [PATCH 1/2] php 5.6 is not yet released, so use 5.6.0-dev here
-
----
- src/Framework/MockObject/Generator.php | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Framework/MockObject/Generator.php b/src/Framework/MockObject/Generator.php
-index a24171a..b2d99b5 100644
---- a/src/Framework/MockObject/Generator.php
-+++ b/src/Framework/MockObject/Generator.php
-@@ -1105,7 +1105,7 @@ private function isInternalClass(ReflectionClass $class)
- private function unserializeHackIsSupported()
- {
- if (PHP_VERSION == '5.4.29' || PHP_VERSION == '5.5.13' ||
-- version_compare(PHP_VERSION, '5.6.0', '>=')) {
-+ version_compare(PHP_VERSION, '5.6.0-dev', '>=')) {
- return FALSE;
- }
-
---
-1.9.3
-
-
-From a7dfbd7aa63570a789e0bfaec15046071b33483a Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora@famillecollet.com>
-Date: Thu, 12 Jun 2014 09:08:22 +0200
-Subject: [PATCH 2/2] fix unzerialize regression in most of the case
-
----
- src/Framework/MockObject/Generator.php | 26 +++++---------------------
- 1 file changed, 5 insertions(+), 21 deletions(-)
-
-diff --git a/src/Framework/MockObject/Generator.php b/src/Framework/MockObject/Generator.php
-index b2d99b5..7e2983c 100644
---- a/src/Framework/MockObject/Generator.php
-+++ b/src/Framework/MockObject/Generator.php
-@@ -274,15 +274,13 @@ protected function getObject($code, $className, $type = '', $callOriginalConstru
- $class = new ReflectionClass($className);
- $isInternal = $this->isInternalClass($class);
-
-- if ($isInternal && !$this->unserializeHackIsSupported()) {
-- throw new PHPUnit_Framework_MockObject_RuntimeException(
-- 'Internal classes cannot be mocked without invoking their constructor in PHP ' . PHP_VERSION
-- );
-- }
--
- if ($isInternal || !$hasNewInstanceWithoutConstructor) {
- $object = unserialize(
-- sprintf('O:%d:"%s":0:{}', strlen($className), $className)
-+ sprintf('%s:%d:"%s":0:{}',
-+ (version_compare(PHP_VERSION, '5.4', '>') && $class->implementsInterface("Serializable") ? "C" : "O"),
-+ strlen($className),
-+ $className
-+ )
- );
- } else {
- $object = $class->newInstanceWithoutConstructor();
-@@ -1097,18 +1095,4 @@ private function isInternalClass(ReflectionClass $class)
-
- return false;
- }
--
-- /**
-- * @return boolean
-- * @since Method available since Release 2.0.9
-- */
-- private function unserializeHackIsSupported()
-- {
-- if (PHP_VERSION == '5.4.29' || PHP_VERSION == '5.5.13' ||
-- version_compare(PHP_VERSION, '5.6.0-dev', '>=')) {
-- return FALSE;
-- }
--
-- return TRUE;
-- }
- }
---
-1.9.3
-