summaryrefslogtreecommitdiffstats
path: root/phpunit7-php8.patch
diff options
context:
space:
mode:
Diffstat (limited to 'phpunit7-php8.patch')
-rw-r--r--phpunit7-php8.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/phpunit7-php8.patch b/phpunit7-php8.patch
index abe16d5..c5c9e06 100644
--- a/phpunit7-php8.patch
+++ b/phpunit7-php8.patch
@@ -256,3 +256,64 @@ diff -up ./tests/unit/Framework/Constraint/JsonMatchesErrorMessageProviderTest.p
],
'JSON_ERROR_DEPTH' => [
'Maximum stack depth exceeded', \JSON_ERROR_DEPTH, '',
+diff -up ./src/Util/Configuration.php.old ./src/Util/Configuration.php
+--- ./src/Util/Configuration.php.old 2021-09-10 08:26:04.654231054 +0200
++++ ./src/Util/Configuration.php 2021-09-10 08:27:14.019129699 +0200
+@@ -567,24 +567,27 @@ final class Configuration
+ */
+ switch ($array) {
+ case 'var':
+- $target = &$GLOBALS;
++ foreach ($configuration[$array] as $name => $data) {
++ $GLOBALS[$name] = $data['value'];
++ }
+
+ break;
+
+ case 'server':
+- $target = &$_SERVER;
++ foreach ($configuration[$array] as $name => $data) {
++ $_SERVER[$name] = $data['value'];
++ }
+
+ break;
+
+ default:
+- $target = &$GLOBALS['_' . \strtoupper($array)];
++ foreach ($configuration[$array] as $name => $data) {
++ $GLOBALS['_' . \strtoupper($array)][$name] = $data['value'];
++ }
+
+ break;
+ }
+
+- foreach ($configuration[$array] as $name => $data) {
+- $target[$name] = $data['value'];
+- }
+ }
+
+ foreach ($configuration['env'] as $name => $data) {
+diff -up ./src/Util/PHP/Template/TestCaseClass.tpl.dist.old ./src/Util/PHP/Template/TestCaseClass.tpl.dist
+--- ./src/Util/PHP/Template/TestCaseClass.tpl.dist.old 2021-09-10 08:26:32.213191401 +0200
++++ ./src/Util/PHP/Template/TestCaseClass.tpl.dist 2021-09-10 08:26:55.407157223 +0200
+@@ -87,7 +87,7 @@ if ('' !== $configurationFilePath) {
+ unset($configuration);
+ }
+
+-function __phpunit_error_handler($errno, $errstr, $errfile, $errline, $errcontext)
++function __phpunit_error_handler($errno, $errstr, $errfile, $errline, $errcontext=null)
+ {
+ return true;
+ }
+diff -up ./src/Util/PHP/Template/TestCaseMethod.tpl.dist.old ./src/Util/PHP/Template/TestCaseMethod.tpl.dist
+--- ./src/Util/PHP/Template/TestCaseMethod.tpl.dist.old 2021-09-10 08:26:26.609199466 +0200
++++ ./src/Util/PHP/Template/TestCaseMethod.tpl.dist 2021-09-10 08:26:48.235167829 +0200
+@@ -89,7 +89,7 @@ if ('' !== $configurationFilePath) {
+ unset($configuration);
+ }
+
+-function __phpunit_error_handler($errno, $errstr, $errfile, $errline, $errcontext)
++function __phpunit_error_handler($errno, $errstr, $errfile, $errline, $errcontext=null)
+ {
+ return true;
+ }