Control: retitle -1 Incompatibility of phpunit 5.2.12-1 with phpunit-mock-object 3.1.2-1 makes php-symfony-security-acl FTBFS Control: reassign -1 phpunit Control: affects -1 php-symfony-security-acl Control: severity -1 important Control: tags -1 +patch
Am Donnerstag, den 31.03.2016, 10:54 +0200 schrieb Daniel Beyer: > (...) > > Using the nightly beta build of phpunit 5.3 (from phpunit.de) I see > exactly the same error, thus I suspect it is related to > phpunit-mock-objects. I'll forward this issue upstream later today. > Actually phpunit 5.3, with the exact same message, throws only a warning instead of an error. Looking more closely phpunit-mock-object 3.1.2-1 now "Trigger an error when final or private method is configured" [1]. In phpunit 5.3 this is lowered to a warning, but phpunit 5.2 is not aware of this new error now thrown by phpunit-mock-objects. So the combination of phpunit 5.2.12-1 and phpunit-mock-object 3.1.2-1, which we currently have in Debian, is the real problem. Thus I reassigned this bug to phpunit by lowering the severity to important. I prepared a patch in phpunit's Debian packaging repo [2] in branch 'fix-mock-object-3.1-compatibility-with-phpunit-5.2', which as well is attached to this message. It would be great if someone from the team could check on this and do the actual upload for me, since I have no upload rights. Thanks Daniel [1] https://github.com/sebastianbergmann/phpunit-mock-objects/issues/296 [2] http://anonscm.debian.org/cgit/pkg-php/phpunit.git/?h=fix-mock-object-3.1-compatibility-with-phpunit-5.2
From afc161e00d8591277e3ddcd6bbec7d0096a3db07 Mon Sep 17 00:00:00 2001 From: Daniel Beyer <d...@deb.ymc.ch> Date: Thu, 31 Mar 2016 12:51:01 +0200 Subject: [PATCH] Add patch to add phpunit-mock-object 3.1.x compatibility (Closes: #819620) - 0002-Fix-compatibility-with-phpunit-mock-object-3.1.patch Git-Dch: Full --- ...ompatibility-with-phpunit-mock-object-3.1.patch | 43 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 44 insertions(+) create mode 100644 debian/patches/0002-Fix-compatibility-with-phpunit-mock-object-3.1.patch diff --git a/debian/patches/0002-Fix-compatibility-with-phpunit-mock-object-3.1.patch b/debian/patches/0002-Fix-compatibility-with-phpunit-mock-object-3.1.patch new file mode 100644 index 0000000..991de98 --- /dev/null +++ b/debian/patches/0002-Fix-compatibility-with-phpunit-mock-object-3.1.patch @@ -0,0 +1,43 @@ +From: Sebastian Bergmann <sebast...@thephp.cc> +Date: Fri, 4 Mar 2016 09:18:16 +0100 +Subject: Fix compatibility with phpunit-mock-object 3.1 + +Bug-Debian: https://bugs.debian.org/819620 +Bug: https://github.com/sebastianbergmann/phpunit-mock-objects/issues/296 +Origin: https://github.com/sebastianbergmann/phpunit/commit/c4f4435a4f4f75da77af6e4d5138ca3c14933e53 +Applied-Upstream: 5.3.0 +--- + composer.json | 2 +- + src/Framework/TestResult.php | 6 ++++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/composer.json b/composer.json +index b7c786f..564961a 100644 +--- a/composer.json ++++ b/composer.json +@@ -26,7 +26,7 @@ + "phpunit/php-text-template": "~1.2", + "phpunit/php-code-coverage": "^3.3.0", + "phpunit/php-timer": ">=1.0.6", +- "phpunit/phpunit-mock-objects": ">=3.0.5", ++ "phpunit/phpunit-mock-objects": "^3.1", + "phpspec/prophecy": "^1.3.1", + "symfony/yaml": "~2.1|~3.0", + "sebastian/comparator": "~1.1", +diff --git a/src/Framework/TestResult.php b/src/Framework/TestResult.php +index b47a271..2204338 100644 +--- a/src/Framework/TestResult.php ++++ b/src/Framework/TestResult.php +@@ -685,6 +685,12 @@ function_exists('xdebug_start_function_monitor'); + } else { + $test->runBare(); + } ++ } catch (PHPUnit_Framework_MockObject_Exception $e) { ++ $e = new PHPUnit_Framework_Warning( ++ $e->getMessage() ++ ); ++ ++ $warning = true; + } catch (PHPUnit_Framework_AssertionFailedError $e) { + $failure = true; + diff --git a/debian/patches/series b/debian/patches/series index fd1a21f..4b8214b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-Remove-Composer-autoload.patch +0002-Fix-compatibility-with-phpunit-mock-object-3.1.patch -- 2.1.4