Skip to content

Commit 46405c4

Browse files
committed
Attempt to fix failing unit tests that use runInSeparateProcess
1 parent baf5165 commit 46405c4

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@
108108
"phpunit/phpunit": {
109109
"Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch",
110110
"Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch",
111-
"Fix PHP 8.1 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php81.patch"
111+
"Fix PHP 8.1 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php81.patch",
112+
"Fix PHP 8.3 compatibility": "tests/phpunit_php83.patch"
112113
}
113114
}
114115
},

tests/phpunit_php83.patch

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/src/Util/PHP/Template/TestCaseMethod.tpl.dist
2+
+++ b/src/Util/PHP/Template/TestCaseMethod.tpl.dist
3+
@@ -56,7 +56,7 @@
4+
}
5+
6+
@rewind(STDOUT); /* @ as not every STDOUT target stream is rewindable */
7+
- if ($stdout = stream_get_contents(STDOUT)) {
8+
+ if ($stdout = @stream_get_contents(STDOUT)) {
9+
$output = $stdout . $output;
10+
}
11+

0 commit comments

Comments
 (0)