summaryrefslogtreecommitdiffstats
path: root/phpunit-mock-objects-php80.patch
diff options
context:
space:
mode:
Diffstat (limited to 'phpunit-mock-objects-php80.patch')
-rw-r--r--phpunit-mock-objects-php80.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/phpunit-mock-objects-php80.patch b/phpunit-mock-objects-php80.patch
new file mode 100644
index 0000000..918de51
--- /dev/null
+++ b/phpunit-mock-objects-php80.patch
@@ -0,0 +1,20 @@
+diff -up ./src/Framework/MockObject/Generator.php.old ./src/Framework/MockObject/Generator.php
+--- ./src/Framework/MockObject/Generator.php.old 2021-03-18 14:27:57.237056358 +0100
++++ ./src/Framework/MockObject/Generator.php 2021-03-18 14:28:03.916026672 +0100
+@@ -1207,13 +1207,13 @@ class PHPUnit_Framework_MockObject_Gener
+ }
+
+ $typeDeclaration = $typename . ' ';
+- } elseif ($parameter->isArray()) {
++ } elseif (@$parameter->isArray()) {
+ $typeDeclaration = 'array ';
+- } elseif ($parameter->isCallable()) {
++ } elseif (@$parameter->isCallable()) {
+ $typeDeclaration = 'callable ';
+ } else {
+ try {
+- $class = $parameter->getClass();
++ $class = @$parameter->getClass();
+ } catch (ReflectionException $e) {
+ throw new PHPUnit_Framework_MockObject_RuntimeException(
+ sprintf(