Skip to content

Commit 50b8e25

Browse files
committed
Fix ext/standard tests for PHP-8.3
1 parent abef95d commit 50b8e25

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

patches/8.3/tests.patch

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,32 @@ Subject: Fix tests
88
ZipArchive::registerProgressCallback() is only available when using
99
libzip 1.3.0 or newer.
1010
ZipArchive::RDONLY is available only with libzip >= 1.0.0
11+
12+
- ext/standard
13+
The tempnam() needs some existing directory, otherwise it emits a
14+
notice (e.g., when running tests from out-of-source build and running
15+
run-tests.php script from a directory not in the php-src).
1116
---
17+
ext/standard/tests/file/002.phpt | 2 +-
1218
ext/zip/tests/gh18431.phpt | 4 ++++
1319
ext/zip/tests/oo_addemptydir_error.phpt | 2 +-
1420
ext/zip/tests/oo_addglob2.phpt | 6 ++++++
1521
ext/zip/tests/oo_encryption.phpt | 6 ++++++
16-
4 files changed, 17 insertions(+), 1 deletion(-)
22+
5 files changed, 18 insertions(+), 2 deletions(-)
1723

24+
diff --git a/ext/standard/tests/file/002.phpt b/ext/standard/tests/file/002.phpt
25+
index 134f5416fc4..0eb882dc397 100644
26+
--- a/ext/standard/tests/file/002.phpt
27+
+++ b/ext/standard/tests/file/002.phpt
28+
@@ -22,7 +22,7 @@
29+
blah blah blah blah blah blah blah
30+
EOD;
31+
32+
-$name = tempnam("./ext/standard/tests/file/", "php");
33+
+$name = tempnam(__DIR__, "php");
34+
$fp = fopen($name, "w");
35+
fwrite($fp, $data);
36+
fclose($fp);
1837
diff --git a/ext/zip/tests/gh18431.phpt b/ext/zip/tests/gh18431.phpt
1938
index d4eb89c36c6..dcd7db6f400 100644
2039
--- a/ext/zip/tests/gh18431.phpt

0 commit comments

Comments
 (0)