Skip to content

Commit 0f5c255

Browse files
Merge branch 'master' into zendmm-remove-debug-custom-handlers
2 parents 5499d25 + 7b7f97b commit 0f5c255

File tree

161 files changed

+2978
-1931
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+2978
-1931
lines changed

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ jobs:
6969
`#snmp-mibs-downloader` \
7070
freetds-dev \
7171
`#unixodbc-dev` \
72-
libc-client-dev \
7372
dovecot-core \
7473
dovecot-pop3d \
7574
dovecot-imapd \

.github/actions/apt-x64/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ runs:
5959
unixodbc-dev \
6060
llvm \
6161
clang \
62-
libc-client-dev \
6362
dovecot-core \
6463
dovecot-pop3d \
6564
dovecot-imapd \

NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ PHP NEWS
3333
. Fix DOMElement->prefix with empty string creates bogus prefix. (nielsdos)
3434
. Handle OOM more consistently. (nielsdos)
3535
. Implemented "Improve callbacks in ext/dom and ext/xsl" RFC. (nielsdos)
36+
. Added DOMXPath::quote() static method. (divinity76)
3637

3738
- Fileinfo:
3839
. Update to libmagic 5.45. (nielsdos)
@@ -69,6 +70,9 @@ PHP NEWS
6970
. Added LDAP_OPT_X_TLS_PROTOCOL_MAX/LDAP_OPT_X_TLS_PROTOCOL_TLS1_3
7071
constants. (StephenWall)
7172

73+
- LibXML:
74+
. Added LIBXML_RECOVER constant. (nielsdos)
75+
7276
- MBString:
7377
. Added mb_trim, mb_ltrim and mb_rtrim. (Yuya Hamada)
7478

@@ -188,6 +192,8 @@ PHP NEWS
188192
. debug_zval_dump() now indicates whether an array is packed. (Max Semenik)
189193
. Fix GH-12143 (Optimize round). (SakiTakamachi)
190194
. Changed return type of long2ip to string from string|false. (Jorg Sowa)
195+
. Fix GH-12143 (Extend the maximum precision round can handle by one digit).
196+
(SakiTakamachi)
191197

192198
- XML:
193199
. Added XML_OPTION_PARSE_HUGE parser option. (nielsdos)

UPGRADING

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ PHP 8.4 UPGRADE NOTES
4141
DOMException now. This situation is extremely unlikely though and probably
4242
will not affect you. As a result DOMImplementation::createDocument() now has
4343
a tentative return type of DOMDocument instead of DOMDocument|false.
44+
. Previously, DOMXPath objects could be cloned, but resulted in an unusable
45+
object. This is no longer possible, and cloning a DOMXPath object now throws
46+
an error.
4447

4548
- MBString:
4649
. mb_encode_numericentity() and mb_decode_numericentity() now check that
@@ -226,6 +229,8 @@ PHP 8.4 UPGRADE NOTES
226229
- Reflection:
227230
. ReflectionAttribute now contains a $name property to improve the debugging
228231
experience.
232+
. ReflectionClassConstant::__toString() and ReflectionProperty::__toString()
233+
now returns the attached doc comments.
229234

230235
- SOAP:
231236
. Added support for clark notation for namespaces in class map.
@@ -381,6 +386,8 @@ PHP 8.4 UPGRADE NOTES
381386
certain numbers, so this fix removes "pre-rounding" and changes the way numbers
382387
are compared, so that the values ​​are correctly rounded as decimal numbers.
383388
. long2ip() now returns string instead of string|false.
389+
. The maximum precision that can be handled by round() has been extended by
390+
one digit.
384391

385392
========================================
386393
6. New Functions
@@ -390,6 +397,8 @@ PHP 8.4 UPGRADE NOTES
390397
. Added DOMNode::compareDocumentPosition().
391398
. Added DOMXPath::registerPhpFunctionNS().
392399
RFC: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl
400+
. Added DOMXPath::quote() to quote a string for use in an XPath expression.
401+
Example usage: "//span[contains(text()," . $xpath->quote($string) . ")]"
393402

394403
- Intl:
395404
. Added IntlDateFormatter::getIanaID()/intltz_get_iana_id() to
@@ -475,6 +484,9 @@ PHP 8.4 UPGRADE NOTES
475484
. LDAP_OPT_X_TLS_PROTOCOL_MAX.
476485
. LDAP_OPT_X_TLS_PROTOCOL_TLS1_3.
477486

487+
- LibXML:
488+
. LIBXML_RECOVER.
489+
478490
- OpenSSL:
479491
. X509_PURPOSE_OCSP_HELPER.
480492
. X509_PURPOSE_TIMESTAMP_SIGN.

UPGRADING.INTERNALS

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ PHP 8.4 INTERNALS UPGRADE NOTES
3737
* The zend_*printf family of functions now supports the "%S" modifier to print
3838
out zend_string*. This won't cut off the string if it embeds a NUL byte.
3939

40+
* The inet_aton() and win32/inet.h on Windows have been removed. Use Windows
41+
native inet_pton() from ws2tcpip.h.
42+
4043
* zend_mm_set_custom_debug_handlers() has been removed from ZendMM, use
4144
zend_mm_set_custom_handlers() instead which now supports DEBUG builds
4245

@@ -74,7 +77,6 @@ PHP 8.4 INTERNALS UPGRADE NOTES
7477
void(*)(void *, size_t) to
7578
void(*)(void *, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
7679

77-
7880
========================
7981
2. Build system changes
8082
========================
@@ -104,6 +106,10 @@ PHP 8.4 INTERNALS UPGRADE NOTES
104106
- Symbol DARWIN has been removed (use __APPLE__ to target Darwin systems).
105107
- Symbol MISSING_FCLOSE_DECL and M4 macro PHP_MISSING_FCLOSE_DECL removed.
106108
- Symbol HAVE_BSD_ICONV has been removed.
109+
- Symbol ZEND_FIBER_ASM has been removed.
110+
- Symbols HAVE_DLOPEN and HAVE_DLSYM have been removed.
111+
- Symbol HAVE_LIBM has been removed.
112+
- Symbol HAVE_INET_ATON has been removed.
107113
- M4 macro PHP_DEFINE (atomic includes) removed (use AC_DEFINE and config.h).
108114
- M4 macro PHP_WITH_SHARED has been removed (use PHP_ARG_WITH).
109115
- M4 macro PHP_STRUCT_FLOCK has been removed (use AC_CHECK_TYPES).
@@ -140,6 +146,13 @@ PHP 8.4 INTERNALS UPGRADE NOTES
140146
the new php_random_result struct, replacing the last_generated_size
141147
member of the php_random_status struct and the generate_size member of
142148
the php_random_algo struct.
149+
- The php_random_status struct has been removed, since the previous change
150+
reduced it to a single void* member containing the actual state, resulting
151+
in needless indirection. Functions taking a php_random_algo struct pointer
152+
and a php_random_status struct pointer as separate parameters now take a
153+
single php_random_algo_with_state struct by value, making it easier to
154+
pass around the state with its associated algorithm and thus reducing
155+
the chance for mistakes.
143156
- The CSPRNG API (php_random_(bytes|int)_*) is now provided by the new
144157
and much smaller php_random_csprng.h header. The new header is included
145158
in php_random.h for compatibility with existing users.

Zend/Zend.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ AC_CHECK_FUNCS(getpid kill pthread_getattr_np pthread_attr_get_np pthread_get_st
151151
dnl Check for sigsetjmp. If it's defined as a macro, AC_CHECK_FUNCS won't work.
152152
AC_CHECK_FUNCS([sigsetjmp],,
153153
[AC_CHECK_DECL([sigsetjmp],
154-
[AC_DEFINE([HAVE_SIGSETJMP],[1],[Define to 1 if you have the 'sigsetjmp' function.])],,
154+
[AC_DEFINE([HAVE_SIGSETJMP], [1])],,
155155
[#include <setjmp.h>])])
156156
157157
dnl Test whether the stack grows downwards

Zend/tests/offsets/ArrayAccess_container_offset_behaviour.phpt

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,37 @@ VAR_DUMP_OF_OFFSET
4040
string(12) "CLASS_NAME::offsetGet"
4141
VAR_DUMP_OF_OFFSET
4242
int(5)
43+
Reference to dimension:
44+
string(12) "CLASS_NAME::offsetGet"
45+
VAR_DUMP_OF_OFFSET
46+
47+
Notice: Indirect modification of overloaded element of CLASS_NAME has no effect in %s on line 55
48+
Value of reference:
49+
int(5)
50+
Value of container dimension after write to reference (should be int(100) if successful):
51+
string(12) "CLASS_NAME::offsetGet"
52+
VAR_DUMP_OF_OFFSET
53+
int(5)
4354
unset():
4455
string(14) "CLASS_NAME::offsetUnset"
4556
VAR_DUMP_OF_OFFSET
4657
Nested read:
4758
string(12) "CLASS_NAME::offsetGet"
4859
VAR_DUMP_OF_OFFSET
4960
50-
Warning: Trying to access array offset on int in %s on line 62
61+
Warning: Trying to access array offset on int in %s on line 74
5162
NULL
5263
Nested write:
5364
string(12) "CLASS_NAME::offsetGet"
5465
VAR_DUMP_OF_OFFSET
5566
56-
Notice: Indirect modification of overloaded element of CLASS_NAME has no effect in %s on line 69
67+
Notice: Indirect modification of overloaded element of CLASS_NAME has no effect in %s on line 81
5768
Cannot use a scalar value as an array
5869
Nested Read-Write:
5970
string(12) "CLASS_NAME::offsetGet"
6071
VAR_DUMP_OF_OFFSET
6172
62-
Notice: Indirect modification of overloaded element of CLASS_NAME has no effect in %s on line 76
73+
Notice: Indirect modification of overloaded element of CLASS_NAME has no effect in %s on line 88
6374
Cannot use a scalar value as an array
6475
Nested isset():
6576
string(15) "CLASS_NAME::offsetExists"
@@ -83,7 +94,7 @@ Nested unset():
8394
string(12) "CLASS_NAME::offsetGet"
8495
VAR_DUMP_OF_OFFSET
8596
86-
Notice: Indirect modification of overloaded element of CLASS_NAME has no effect in %s on line 102
97+
Notice: Indirect modification of overloaded element of CLASS_NAME has no effect in %s on line 114
8798
Cannot unset offset in a non-array variable
8899
89100
OUTPUT;
@@ -112,6 +123,37 @@ foreach (['A', 'B'] as $class) {
112123
EXPECTED_OUTPUT
113124
);
114125

126+
if ($varOutput !== $expected_output) {
127+
file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . "debug_ArrayAccess_container_{$failuresNb}.txt", $varOutput);
128+
++$failuresNb;
129+
$failures[] = $error;
130+
}
131+
++$testCasesTotal;
132+
}
133+
/* Using offsets as references */
134+
foreach ($offsets as $offset) {
135+
$dimension = &$offset;
136+
$container = new $class();
137+
$error = "(new $class())[&" . zend_test_var_export($dimension) . '] has different outputs' . "\n";
138+
ob_start();
139+
var_dump($dimension);
140+
$var_dump_output = ob_get_clean();
141+
142+
include $var_dim_filename;
143+
$varOutput = ob_get_contents();
144+
ob_clean();
145+
$varOutput = str_replace(
146+
[$var_dim_filename],
147+
['%s'],
148+
$varOutput
149+
);
150+
151+
$expected_output = str_replace(
152+
["VAR_DUMP_OF_OFFSET\n", "CLASS_NAME"],
153+
[$var_dump_output, $class],
154+
EXPECTED_OUTPUT
155+
);
156+
115157
if ($varOutput !== $expected_output) {
116158
file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . "debug_ArrayAccess_container_{$failuresNb}.txt", $varOutput);
117159
++$failuresNb;

0 commit comments

Comments
 (0)