Skip to content

Commit 9d6d954

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 4eef4db + af509ef commit 9d6d954

File tree

3 files changed

+107
-18
lines changed

3 files changed

+107
-18
lines changed

patches/8.3/tests.patch

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,20 @@ Subject: Fix tests
1313
The tempnam() needs some existing directory, otherwise it emits a
1414
notice (e.g., when running tests from out-of-source build and running
1515
run-tests.php script from a directory not in the php-src).
16+
17+
On Solaris 10, unlink() removes entire ext/standard/tests/file
18+
directory, as the system unlink functionality is different. This bug
19+
is not documented and should be probably resolved in a system-agnostic
20+
way at some point. On Solaris 11.4 unlink() works as expected,
21+
otherwise.
1622
---
17-
ext/standard/tests/file/002.phpt | 2 +-
18-
ext/zip/tests/gh18431.phpt | 4 ++++
19-
ext/zip/tests/oo_addemptydir_error.phpt | 2 +-
20-
ext/zip/tests/oo_addglob2.phpt | 6 ++++++
21-
ext/zip/tests/oo_encryption.phpt | 6 ++++++
22-
5 files changed, 18 insertions(+), 2 deletions(-)
23+
ext/standard/tests/file/002.phpt | 2 +-
24+
ext/standard/tests/file/copy_variation4.phpt | 11 +++++++++--
25+
ext/zip/tests/gh18431.phpt | 4 ++++
26+
ext/zip/tests/oo_addemptydir_error.phpt | 2 +-
27+
ext/zip/tests/oo_addglob2.phpt | 6 ++++++
28+
ext/zip/tests/oo_encryption.phpt | 6 ++++++
29+
6 files changed, 27 insertions(+), 4 deletions(-)
2330

2431
diff --git a/ext/standard/tests/file/002.phpt b/ext/standard/tests/file/002.phpt
2532
index 134f5416fc4..0eb882dc397 100644
@@ -34,6 +41,28 @@ index 134f5416fc4..0eb882dc397 100644
3441
$fp = fopen($name, "w");
3542
fwrite($fp, $data);
3643
fclose($fp);
44+
diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt
45+
index d467cb4ce9a..99e7ab2ebd6 100644
46+
--- a/ext/standard/tests/file/copy_variation4.phpt
47+
+++ b/ext/standard/tests/file/copy_variation4.phpt
48+
@@ -5,8 +5,15 @@
49+
if(substr(PHP_OS, 0, 3) == "WIN")
50+
die("skip Do not run on Windows");
51+
52+
-if(substr(PHP_OS, 0, 3) == "AIX")
53+
- die("skip Do not run on AIX");
54+
+// unlink() removes entire ext/standard/tests/file directory on these systems:
55+
+if(substr(PHP_OS, 0, 3) == "AIX") {
56+
+ die("skip Do not run on AIX");
57+
+}
58+
+
59+
+// unlink() removes entire directory on Solaris 10 (on Solaris 11.4 it's ok):
60+
+if(substr(PHP_OS, 0, 5) == "SunOS") {
61+
+ die("skip Do not run on Solaris/illumos");
62+
+}
63+
?>
64+
--FILE--
65+
<?php
3766
diff --git a/ext/zip/tests/gh18431.phpt b/ext/zip/tests/gh18431.phpt
3867
index d4eb89c36c6..dcd7db6f400 100644
3968
--- a/ext/zip/tests/gh18431.phpt

patches/8.4/tests.patch

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ Subject: Fix tests
1212
ZipArchive::registerProgressCallback() is only available when using
1313
libzip 1.3.0 or newer.
1414
ZipArchive::RDONLY is available only with libzip >= 1.0.0
15+
16+
On Solaris 10, unlink() removes entire ext/standard/tests/file
17+
directory, as the system unlink functionality is different. This bug
18+
is not documented and should be probably resolved in a system-agnostic
19+
way at some point. On Solaris 11.4 unlink() works as expected,
20+
otherwise.
1521
---
16-
ext/dom/tests/dom_xinclude.phpt | 4 ++--
17-
ext/zip/tests/gh18431.phpt | 4 ++++
18-
ext/zip/tests/oo_addemptydir_error.phpt | 2 +-
19-
ext/zip/tests/oo_addglob2.phpt | 6 ++++++
20-
ext/zip/tests/oo_encryption.phpt | 6 ++++++
21-
5 files changed, 19 insertions(+), 3 deletions(-)
22+
ext/dom/tests/dom_xinclude.phpt | 4 ++--
23+
ext/standard/tests/file/copy_variation4.phpt | 12 +++++++++---
24+
ext/zip/tests/gh18431.phpt | 4 ++++
25+
ext/zip/tests/oo_addemptydir_error.phpt | 2 +-
26+
ext/zip/tests/oo_addglob2.phpt | 6 ++++++
27+
ext/zip/tests/oo_encryption.phpt | 6 ++++++
28+
6 files changed, 28 insertions(+), 6 deletions(-)
2229

2330
diff --git a/ext/dom/tests/dom_xinclude.phpt b/ext/dom/tests/dom_xinclude.phpt
2431
index 0dfeb2dfb4a..410431de877 100644
@@ -37,6 +44,29 @@ index 0dfeb2dfb4a..410431de877 100644
3744
<title>The Pearl</title>
3845
<author>John Steinbeck</author>
3946
</book>
47+
diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt
48+
index d467cb4ce9a..f31a1ddb117 100644
49+
--- a/ext/standard/tests/file/copy_variation4.phpt
50+
+++ b/ext/standard/tests/file/copy_variation4.phpt
51+
@@ -5,9 +5,15 @@
52+
if(substr(PHP_OS, 0, 3) == "WIN")
53+
die("skip Do not run on Windows");
54+
55+
-if(substr(PHP_OS, 0, 3) == "AIX")
56+
- die("skip Do not run on AIX");
57+
-?>
58+
+// unlink() removes entire ext/standard/tests/file directory on these systems:
59+
+if(substr(PHP_OS, 0, 3) == "AIX") {
60+
+ die("skip Do not run on AIX");
61+
+}
62+
+
63+
+// unlink() removes entire directory on Solaris 10 (on Solaris 11.4 it's ok):
64+
+if(substr(PHP_OS, 0, 5) == "SunOS") {
65+
+ die("skip Do not run on Solaris/illumos");
66+
+}
67+
--FILE--
68+
<?php
69+
/* Test copy() function: In creation of destination file names with empty string, nulls & bools
4070
diff --git a/ext/zip/tests/gh18431.phpt b/ext/zip/tests/gh18431.phpt
4171
index d4eb89c36c6..dcd7db6f400 100644
4272
--- a/ext/zip/tests/gh18431.phpt

patches/8.5/tests.patch

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ Subject: Fix tests
1212
ZipArchive::registerProgressCallback() is only available when using
1313
libzip 1.3.0 or newer.
1414
ZipArchive::RDONLY is available only with libzip >= 1.0.0
15+
16+
On Solaris 10, unlink() removes entire ext/standard/tests/file
17+
directory, as the system unlink functionality is different. This bug
18+
is not documented and should be probably resolved in a system-agnostic
19+
way at some point. On Solaris 11.4 unlink() works as expected,
20+
otherwise.
1521
---
16-
ext/dom/tests/dom_xinclude.phpt | 4 ++--
17-
ext/zip/tests/gh18431.phpt | 4 ++++
18-
ext/zip/tests/oo_addemptydir_error.phpt | 2 +-
19-
ext/zip/tests/oo_addglob2.phpt | 6 ++++++
20-
ext/zip/tests/oo_encryption.phpt | 6 ++++++
21-
5 files changed, 19 insertions(+), 3 deletions(-)
22+
ext/dom/tests/dom_xinclude.phpt | 4 ++--
23+
ext/standard/tests/file/copy_variation4.phpt | 12 +++++++++---
24+
ext/zip/tests/gh18431.phpt | 4 ++++
25+
ext/zip/tests/oo_addemptydir_error.phpt | 2 +-
26+
ext/zip/tests/oo_addglob2.phpt | 6 ++++++
27+
ext/zip/tests/oo_encryption.phpt | 6 ++++++
28+
6 files changed, 28 insertions(+), 6 deletions(-)
2229

2330
diff --git a/ext/dom/tests/dom_xinclude.phpt b/ext/dom/tests/dom_xinclude.phpt
2431
index 0dfeb2dfb4a..410431de877 100644
@@ -37,6 +44,29 @@ index 0dfeb2dfb4a..410431de877 100644
3744
<title>The Pearl</title>
3845
<author>John Steinbeck</author>
3946
</book>
47+
diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt
48+
index d467cb4ce9a..f31a1ddb117 100644
49+
--- a/ext/standard/tests/file/copy_variation4.phpt
50+
+++ b/ext/standard/tests/file/copy_variation4.phpt
51+
@@ -5,9 +5,15 @@
52+
if(substr(PHP_OS, 0, 3) == "WIN")
53+
die("skip Do not run on Windows");
54+
55+
-if(substr(PHP_OS, 0, 3) == "AIX")
56+
- die("skip Do not run on AIX");
57+
-?>
58+
+// unlink() removes entire ext/standard/tests/file directory on these systems:
59+
+if(substr(PHP_OS, 0, 3) == "AIX") {
60+
+ die("skip Do not run on AIX");
61+
+}
62+
+
63+
+// unlink() removes entire directory on Solaris 10 (on Solaris 11.4 it's ok):
64+
+if(substr(PHP_OS, 0, 5) == "SunOS") {
65+
+ die("skip Do not run on Solaris/illumos");
66+
+}
67+
--FILE--
68+
<?php
69+
/* Test copy() function: In creation of destination file names with empty string, nulls & bools
4070
diff --git a/ext/zip/tests/gh18431.phpt b/ext/zip/tests/gh18431.phpt
4171
index d4eb89c36c6..dcd7db6f400 100644
4272
--- a/ext/zip/tests/gh18431.phpt

0 commit comments

Comments
 (0)