Skip to content

Commit 9fce8f9

Browse files
committed
Merge branch 'master' into internal_vm_interrupt
2 parents b3cdc4a + e63f822 commit 9fce8f9

File tree

757 files changed

+18266
-5600
lines changed

Some content is hidden

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

757 files changed

+18266
-5600
lines changed

.github/scripts/windows/test_task.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ set ODBC_TEST_DSN=Driver={ODBC Driver 17 for SQL Server};Server=^(local^)\SQLEXP
5050
set PDOTEST_DSN=odbc:%ODBC_TEST_DSN%
5151

5252
rem setup Firebird related exts
53-
curl -sLo Firebird.zip https://github.com/FirebirdSQL/firebird/releases/download/v3.0.9/Firebird-3.0.9.33560-0_x64.zip
53+
curl -sLo Firebird.zip https://github.com/FirebirdSQL/firebird/releases/download/v4.0.4/Firebird-4.0.4.3010-0-x64.zip
5454
7z x -oC:\Firebird Firebird.zip
5555
set PDO_FIREBIRD_TEST_DATABASE=C:\test.fdb
5656
set PDO_FIREBIRD_TEST_DSN=firebird:dbname=%PDO_FIREBIRD_TEST_DATABASE%

.github/workflows/nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ jobs:
474474
# Test causes a heap-buffer-overflow but I cannot reproduce it locally...
475475
php -r '$c = file_get_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php"); $c = str_replace("public function testSanitizeDeepNestedString()", "/** @group skip */\n public function testSanitizeDeepNestedString()", $c); file_put_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php", $c);'
476476
# Buggy FFI test in Symfony, see https://github.com/symfony/symfony/issues/47668
477-
php -r '$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php"); $c = str_replace("*/\n public function testCastNonTrailingCharPointer()", "* @group skip\n */\n public function testCastNonTrailingCharPointer()", $c); file_put_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php", $c);'
477+
php -r '$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php"); $c = str_replace("public function testCastNonTrailingCharPointer()", "/** @group skip */\n public function testCastNonTrailingCharPointer()", $c); file_put_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php", $c);'
478478
export SYMFONY_DEPRECATIONS_HELPER=max[total]=999
479479
X=0
480480
for component in $(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n'); do
@@ -888,7 +888,7 @@ jobs:
888888
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
889889
PHP_BUILD_OBJ_DIR: C:\obj
890890
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
891-
PHP_BUILD_SDK_BRANCH: php_downloads_server_migration_v1
891+
PHP_BUILD_SDK_BRANCH: php-sdk-2.3.0
892892
PHP_BUILD_CRT: vs16
893893
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
894894
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ jobs:
241241
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
242242
PHP_BUILD_OBJ_DIR: C:\obj
243243
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
244-
PHP_BUILD_SDK_BRANCH: php_downloads_server_migration_v1
244+
PHP_BUILD_SDK_BRANCH: php-sdk-2.3.0
245245
PHP_BUILD_CRT: vs16
246246
PLATFORM: x64
247247
THREAD_SAFE: "1"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ php
167167
# ------------------------------------------------------------------------------
168168

169169
# Miscellaneous extensions files
170+
/ext/fileinfo/libmagic.orig/
170171
/ext/opcache/jit/zend_jit_x86.c
171172
/ext/opcache/jit/zend_jit_arm64.c
172173
/ext/opcache/minilua

CODING_STANDARDS.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ rewritten to comply with these rules.
99

1010
1. Document your code in source files and the manual. (tm)
1111

12-
1. PHP is implemented in C99. The optional fixed-width integers from
12+
1. PHP is implemented in C99.
13+
For instance, the optional fixed-width integers from
1314
stdint.h (int8_t, int16_t, int32_t, int64_t and their unsigned
14-
counterparts) must be available.
15+
counterparts) are supposed to be available.
16+
However, some features (most notably variable-length arrays) which are not
17+
supported by all relevant compilers, must not be used.
1518

1619
1. Functions that are given pointers to resources should not free them.
1720

NEWS

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,90 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
?? ??? ????, PHP 8.4.0alpha2
3+
?? ??? ????, PHP 8.4.0alpha3
44

5+
- Core:
6+
. Fix GH-14978 (The xmlreader extension phpize build). (Peter Kokot)
7+
. Throw Error exception when encountering recursion during comparison, rather
8+
than fatal error. (ilutov)
9+
10+
- BCMath:
11+
. Adjust bcround()'s $mode parameter to only accept the RoundingMode
12+
enum. (timwolla, saki)
13+
14+
- DOM:
15+
. Fix trampoline leak in xpath callables. (nielsdos)
16+
. Throw instead of silently failing when creating a too long text node in
17+
(DOM)ParentNode and (DOM)ChildNode. (nielsdos)
18+
19+
- FPM:
20+
. /dev/poll events.mechanism for Solaris/Illumos setting had been retired.
21+
(David Carlier)
22+
23+
- Intl:
24+
. Added SpoofChecker::setAllowedChars to set unicode chars ranges.
25+
(David Carlier)
26+
27+
- Opcache:
28+
. Fixed bug GH-13775 (Memory leak possibly related to opcache SHM placement).
29+
(Arnaud)
30+
31+
- OpenSSL:
32+
. Bumped minimum required OpenSSL version to 1.1.0. (cmb)
33+
34+
- PDO_FIREBIRD:
35+
. Added Pdo\Firebird::ATTR_API_VERSION. (SakiTakamachi)
36+
. Added getApiVersion() and removed from getAttribute().
37+
(SakiTakamachi)
38+
. Supported Firebird 4.0 datatypes. (sim1984)
39+
40+
- PGSQL:
41+
. pg_convert/pg_insert/pg_update/pg_delete ; regexes are now cached.
42+
(David Carlier)
43+
44+
- Standard:
45+
. Fix references in request_parse_body() options array. (nielsdos)
46+
. Add RoundingMode enum. (timwolla, saki)
47+
48+
- Tidy:
49+
. Failures in the constructor now throw exceptions rather than emitting
50+
warnings and having a broken object. (nielsdos)
51+
52+
- XSL:
53+
. Fix trampoline leak in xpath callables. (nielsdos)
54+
55+
18 Jul 2024, PHP 8.4.0alpha2
56+
57+
- Core:
58+
. Fixed bug GH-14801 (Fix build for armv7). (andypost)
59+
. Implemented property hooks RFC. (ilutov)
60+
61+
- DOM:
62+
. Improve support for template elements. (nielsdos)
63+
64+
- GD:
65+
. Check overflow/underflow for imagescale/imagefilter. (David Carlier)
66+
67+
- LibXML:
68+
. Added LIBXML_NO_XXE constant. (nielsdos)
69+
70+
- Opcache:
71+
. Fixed bug GH-14873 (PHP 8.4 min function fails on typed integer).
72+
(nielsdos)
73+
74+
- PDO:
75+
. Fixed bug GH-14792 (Compilation failure on pdo_* extensions).
76+
(Peter Kokot)
77+
78+
- Standard:
79+
. Change highlight_string() and print_r() return type to string|true. (Ayesh)
80+
81+
- Windows:
82+
. Update the icon of the Windows executables, e.g. php.exe. (Ayesh,
83+
Nurudin Imširović)
84+
85+
- XML:
86+
. Fixed bug #81481 (xml_get_current_byte_index limited to 32-bit numbers on
87+
64-bit builds). (nielsdos)
588

689
04 Jul 2024, PHP 8.4.0alpha1
790

@@ -177,6 +260,7 @@ PHP NEWS
177260
. Added pcntl_getqos_class/pcntl_setqos_class for macOs. (David Carlier)
178261
. Added SIGCKPT/SIGCKPTEXIT constants for DragonFlyBSD. (David Carlier)
179262
. Added FreeBSD's SIGTRAP handling to pcntl_siginfo_to_zval. (David Carlier)
263+
. Added POSIX pcntl_waitid. (Vladimir Vrzić)
180264

181265
- PCRE:
182266
. Upgrade bundled pcre2lib to version 10.43. (nielsdos)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<a href="https://php.net">
2+
<a href="https://www.php.net">
33
<img
44
alt="PHP"
55
src="https://www.php.net/images/logos/new-php-logo.svg"
@@ -20,7 +20,7 @@ blog to the most popular websites in the world. PHP is distributed under the
2020

2121
## Documentation
2222

23-
The PHP manual is available at [php.net/docs](https://php.net/docs).
23+
The PHP manual is available at [php.net/docs](https://www.php.net/docs).
2424

2525
## Installation
2626

@@ -32,7 +32,7 @@ For Windows, the PHP binaries can be obtained from
3232
[windows.php.net](https://windows.php.net). After extracting the archive the
3333
`*.exe` files are ready to use.
3434

35-
For other systems, see the [installation chapter](https://php.net/install).
35+
For other systems, see the [installation chapter](https://www.php.net/install).
3636

3737
### Building PHP source code
3838

@@ -138,4 +138,4 @@ contribute:
138138
## Credits
139139

140140
For the list of people who've put work into PHP, please see the
141-
[PHP credits page](https://php.net/credits.php).
141+
[PHP credits page](https://www.php.net/credits.php).

TSRM/tsrm.m4

Lines changed: 0 additions & 15 deletions
This file was deleted.

UPGRADING

Lines changed: 67 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ PHP 8.4 UPGRADE NOTES
3131
. The type of PHP_DEBUG and PHP_ZTS constants changed to bool.
3232
. The name of uploaded files and files created by the tempnam() function are
3333
now 13 bytes longer. Total length is platform-dependent.
34+
. Encountering recursion during comparison now results in a Error exception,
35+
rather than a fatal error.
3436

3537
- DOM:
3638
. Added DOMNode::compareDocumentPosition() and DOMNode::DOCUMENT_POSITION_*
@@ -167,6 +169,10 @@ PHP 8.4 UPGRADE NOTES
167169
. strcspn() with empty $characters now returns the length of the string instead
168170
of incorrectly stopping at the first NUL character. See GH-12592.
169171

172+
- Tidy:
173+
. Failures in the constructor now throw exceptions rather than emitting
174+
warnings and having a broken object.
175+
170176
- XML:
171177
. The xml_set_*_handler() functions now declare and check for an effective
172178
signature of callable|string|null for the $handler parameters.
@@ -215,6 +221,8 @@ PHP 8.4 UPGRADE NOTES
215221
RFC: https://wiki.php.net/rfc/new_without_parentheses
216222
. Added the #[\Deprecated] attribute.
217223
RFC: https://wiki.php.net/rfc/deprecated_attribute
224+
. Implemented property hooks.
225+
RFC: https://wiki.php.net/rfc/property-hooks
218226

219227
- Curl:
220228
. curl_version() returns an additional feature_list value, which is an
@@ -342,6 +350,9 @@ PHP 8.4 UPGRADE NOTES
342350
. stream_bucket_make_writeable() and stream_bucket_new() will now return a
343351
StreamBucket instance instead of an stdClass instance.
344352
RFC: https://wiki.php.net/rfc/dedicated_stream_bucket
353+
. Added a new RoundingMode enum with clearer naming and improved discoverability
354+
compared to the PHP_ROUND_* constants.
355+
RFC: https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum
345356

346357
- SOAP:
347358
. Added support for clark notation for namespaces in class map.
@@ -365,6 +376,13 @@ PHP 8.4 UPGRADE NOTES
365376
3. Changes in SAPI modules
366377
========================================
367378

379+
- apache2handler
380+
. Support for EOL Apache 2.0 and 2.2 has been removed. Minimum required Apache
381+
version is now 2.4.
382+
383+
- FPM:
384+
. /dev/poll events.mechanism setting for Solaris/Illumos had been retired.
385+
368386
========================================
369387
4. Deprecated Functionality
370388
========================================
@@ -438,6 +456,10 @@ PHP 8.4 UPGRADE NOTES
438456
. imagejpeg/imagewebp/imagepng/imageavif throws an exception if an invalid
439457
quality parameter value is passed. In addition, imageavif will throw an exception
440458
if an invalid speed parameter value is passed.
459+
. imagescale throws an exception if the width/height argument underflows/overflows or
460+
if the mode argument is invalid.
461+
imagefilter with IMG_FILTER_SCATTER throws an exception if the sub/plus arguments
462+
underflows/overflows.
441463

442464
- Gettext:
443465
. bind_textdomain_codeset, textdomain and d(*)gettext functions now throw an exception
@@ -494,11 +516,16 @@ PHP 8.4 UPGRADE NOTES
494516
. getAttribute, enabled to get values of FB_ATTR_DATE_FORMAT, FB_ATTR_TIME_FORMAT,
495517
FB_ATTR_TIMESTAMP_FORMAT.
496518
. Added new attributes to specify transaction isolation level and access mode.
497-
Along with these, five constants (PDO::FB_TRANSACTION_ISOLATION_LEVEL,
498-
PDO::FB_READ_COMMITTED, PDO::FB_REPEATABLE_READ, PDO::FB_SERIALIZABLE,
499-
PDO::FB_WRITABLE_TRANSACTION) have been added.
519+
Along with these, five constants (Pdo\Firebird::TRANSACTION_ISOLATION_LEVEL,
520+
Pdo\Firebird::READ_COMMITTED, Pdo\Firebird::REPEATABLE_READ,
521+
Pdo\Firebird::SERIALIZABLE, Pdo\Firebird::WRITABLE_TRANSACTION) have been added.
500522
. When using persistent connections, there is now a liveness check in the
501523
constructor.
524+
. The content that is built changes depending on the value of FB_API_VER in
525+
ibase.h, so added static method Pdo\Firebird::getApiVersion() to obtain that
526+
value. This value can also be referenced from phpinfo.
527+
. Five new data types are now available: INT128, DEC16, DEC34, TIMESTAMP_TZ, TIME_TZ.
528+
These are available starting with Firebird 4.0.
502529

503530
- PDO_MYSQL:
504531
. getAttribute, enabled to get the value of ATTR_FETCH_TABLE_NAMES.
@@ -536,25 +563,31 @@ PHP 8.4 UPGRADE NOTES
536563
would have resulted in 1.0 instead of the correct result 0.0. Additional
537564
inputs might also be affected and result in different outputs compared to
538565
earlier PHP versions.
539-
. The default value of the 'cost' option for PASSWORD_BCRYPT for password_hash()
540-
has been increased from '10' to '12'.
566+
. The $mode parameter of the round() function has been widened to RoundingMode|int,
567+
accepting instances of a new RoundingMode enum.
541568

542-
RFC: https://wiki.php.net/rfc/bcrypt_cost_2023
543-
. Four new modes have been added to the round() function: PHP_ROUND_CEILING,
544-
PHP_ROUND_FLOOR, PHP_ROUND_TOWARD_ZERO, PHP_ROUND_AWAY_FROM_ZERO.
569+
RFC: https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum
570+
. Four new modes have been added to the round() function: RoundingMode::PositiveInfinity,
571+
RoundingMode::NegativeInfinity, RoundingMode::TowardsZero, RoundingMode::AwayFromZero.
545572

546573
RFC: https://wiki.php.net/rfc/new_rounding_modes_to_round_function
547-
. debug_zval_dump() now indicates whether an array is packed.
548574
. Fixed a bug caused by "pre-rounding" of the round() function. Previously, using
549575
"pre-rounding" to treat a value like 0.285 (actually 0.28499999999999998) as a
550576
decimal number and round it to 0.29. However, "pre-rounding" incorrectly rounds
551577
certain numbers, so this fix removes "pre-rounding" and changes the way numbers
552578
are compared, so that the values are correctly rounded as decimal numbers.
553-
. long2ip() now returns string instead of string|false.
554579
. The maximum precision that can be handled by round() has been extended by
555580
one digit.
581+
. The default value of the 'cost' option for PASSWORD_BCRYPT for password_hash()
582+
has been increased from '10' to '12'.
583+
584+
RFC: https://wiki.php.net/rfc/bcrypt_cost_2023
585+
. debug_zval_dump() now indicates whether an array is packed.
586+
. long2ip() now returns string instead of string|false.
556587
. output_add_rewrite_var() now uses url_rewriter.hosts instead of
557588
session.trans_sid_hosts for selecting hosts that will be rewritten.
589+
. highlight_string() now has a return type of string|true instead of string|bool.
590+
. print_r() now has a return type of string|true instead of string|bool.
558591

559592
========================================
560593
6. New Functions
@@ -578,6 +611,8 @@ PHP 8.4 UPGRADE NOTES
578611
Selectors.
579612
. Added IntlDateFormatter::parseToCalendar which behaves like
580613
IntlDateFormatter::parse except the time zone is updated.
614+
. Added SpoofChecker::setAllowedChars to limit the range of unicode
615+
chars.
581616

582617
- MBString:
583618
. Added mb_trim, mb_ltrim and mb_rtrim functions.
@@ -594,6 +629,8 @@ PHP 8.4 UPGRADE NOTES
594629
. Added pcntl_getcpu to get the cpu id from where the current process runs.
595630
. Added pcntl_getqos_class to get the QoS level (aka performance and related
596631
energy consumption) of the current process and pcntl_setqos_class to set it.
632+
. Added pcntl_waitid to obtain status information pertaining to termination, stop,
633+
and/or continue events in one of the caller's child processes.
597634

598635
- PDO_PGSQL:
599636
. Added Pdo\Pgsql::setNoticeCallback() to allow a callback to be triggered on
@@ -763,25 +800,34 @@ PHP 8.4 UPGRADE NOTES
763800

764801
- LibXML:
765802
. LIBXML_RECOVER.
803+
. LIBXML_NO_XXE.
804+
This is used together with LIBXML_NOENT for when you want to perform entity
805+
substitution, but want to disallow external entity loading.
806+
This constant is available as of libxml2 2.13.
766807

767808
- OpenSSL:
768809
. X509_PURPOSE_OCSP_HELPER.
769810
. X509_PURPOSE_TIMESTAMP_SIGN.
770811

771812
- PCNTL:
772-
. QosClass::Background (macOs only).
773-
. QosClass::Default (macOs only).
774-
. QosClass::UserInteractive (macOs only).
775-
. QosClass::UserInitiated (macOs only).
776-
. QosClass::Utility (macOs only).
813+
. Pcntl\QosClass::Background (macOs only).
814+
. Pcntl\QosClass::Default (macOs only).
815+
. Pctnl\QosClass::UserInteractive (macOs only).
816+
. Pcntl\QosClass::UserInitiated (macOs only).
817+
. Pcntl\QosClass::Utility (macOs only).
777818
. SIGCKPT (DragonFlyBSD only).
778819
. SIGCKPTEXIT (DragonFlyBSD only).
779-
780-
- Standard:
781-
. PHP_ROUND_CEILING.
782-
. PHP_ROUND_FLOOR.
783-
. PHP_ROUND_TOWARD_ZERO.
784-
. PHP_ROUND_AWAY_FROM_ZERO.
820+
. WEXITED.
821+
. WSTOPPED.
822+
. WNOWAIT.
823+
. P_ALL.
824+
. P_PID.
825+
. P_PGID.
826+
. P_PIDFD (Linux only).
827+
. P_UID (NetBSD/FreeBSD only).
828+
. P_GID (NetBSD/FreeBSD only).
829+
. P_SID (NetBSD/FreeBSD only).
830+
. P_JAILID (FreeBSD only).
785831

786832
- Sockets:
787833
. SO_EXCLUSIVEADDRUSE (Windows only).

0 commit comments

Comments
 (0)