Skip to content

Commit 63edf5a

Browse files
committed
Merge branch 'master' into string-apis
2 parents 07073cc + 1e3d918 commit 63edf5a

File tree

337 files changed

+5389
-2597
lines changed

Some content is hidden

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

337 files changed

+5389
-2597
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# the problem area and could aid in deciding whether a pull request is ready
66
# for merging.
77
#
8+
# When changing this file, please make sure to commit the changes to the
9+
# earliest supported PHP branch (PHP-X.Y) and not only to the master branch.
10+
# GitHub reads the CODEOWNERS file from the pull request's targeted branch.
11+
# Commit changes here similar to bug fixes:
12+
# https://github.com/php/php-src/blob/master/CONTRIBUTING.md#pull-requests
13+
#
814
# For more information, see the GitHub CODEOWNERS documentation:
915
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
1016

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ runs:
4444
libxml2-dev \
4545
libxslt1-dev \
4646
libpq-dev \
47-
libreadline-dev \
47+
libedit-dev \
4848
libldap2-dev \
4949
libsodium-dev \
5050
libargon2-0-dev \

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ runs:
4141
--enable-sysvshm \
4242
--enable-shmop \
4343
--enable-pcntl \
44-
--with-readline \
44+
--without-readline --with-libedit \
4545
--enable-mbstring \
4646
--with-curl \
4747
--with-gettext \

.github/workflows/nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,13 +883,13 @@ jobs:
883883
matrix:
884884
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.windows-matrix-include) }}
885885
name: "${{ matrix.branch.name }}_WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
886-
runs-on: windows-2019
886+
runs-on: ${{ (matrix.branch.version.minor >= 4) && 'windows-2022' || 'windows-2019' }}
887887
env:
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
891891
PHP_BUILD_SDK_BRANCH: php-sdk-2.3.0
892-
PHP_BUILD_CRT: vs16
892+
PHP_BUILD_CRT: ${{ (matrix.branch.version.minor >= 4) && 'vs17' || 'vs16' }}
893893
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
894894
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"
895895
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"

.github/workflows/push.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ jobs:
166166
MYSQL_ROOT_PASSWORD: root
167167
steps:
168168
- name: git checkout
169-
uses: actions/checkout@v3
169+
uses: actions/checkout@v4
170170
- name: apt
171171
uses: ./.github/actions/apt-x32
172172
- name: ccache
@@ -236,13 +236,13 @@ jobs:
236236
WINDOWS:
237237
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
238238
name: WINDOWS_X64_ZTS
239-
runs-on: windows-2019
239+
runs-on: windows-2022
240240
env:
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
244244
PHP_BUILD_SDK_BRANCH: php-sdk-2.3.0
245-
PHP_BUILD_CRT: vs16
245+
PHP_BUILD_CRT: vs17
246246
PLATFORM: x64
247247
THREAD_SAFE: "1"
248248
INTRINSICS: AVX2

NEWS

Lines changed: 89 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,80 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
?? ??? ????, PHP 8.4.0alpha3
3+
?? ??? ????, PHP 8.4.0beta1
4+
5+
- Core:
6+
. Updated build system scripts config.guess to 2024-07-27 and config.sub to
7+
2024-05-27. (Peter Kokot)
8+
. Fixed bug GH-15240 (Infinite recursion in trait hook). (ilutov)
9+
. Fixed bug GH-15140 (Missing variance check for abstract set with asymmetric
10+
type). (ilutov)
11+
. Fixed bug GH-15181 (Disabled output handler is flushed again). (cmb)
12+
. Passing E_USER_ERROR to trigger_error() is now deprecated. (Girgias)
13+
14+
- Date:
15+
. Constants SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, and SUNFUNCS_RET_DOUBLE
16+
are now deprecated. (Jorg Sowa)
17+
18+
- DBA:
19+
. Passing null or false to dba_key_split() is deprecated. (Grigias)
20+
21+
- DOM:
22+
. Fixed bug GH-15192 (Segmentation fault in dom extension
23+
(html5_serializer)). (nielsdos)
24+
. Deprecated DOM_PHP_ERR constant. (nielsdos)
25+
. Removed DOMImplementation::getFeature(). (nielsdos)
26+
27+
- Hash:
28+
. Deprecated passing incorrect data types for options to ext/hash functions.
29+
(nielsdos)
30+
. Added SSE2 and SHA-NI implementation of SHA-256. (timwolla, Colin Percival,
31+
Graham Percival)
32+
33+
- PHPDBG:
34+
. array out of bounds, stack overflow handled for segfault handler on windows.
35+
(David Carlier)
36+
37+
- Random:
38+
. lcg_value() is now deprecated. (timwolla)
39+
40+
- Readline:
41+
. Fixed bug #51558 (Shared readline build fails). (Peter Kokot)
42+
43+
- Session:
44+
. INI settings session.sid_length and session.sid_bits_per_character are now
45+
deprecated. (timwolla)
46+
47+
- SPL:
48+
. The SplFixedArray::__wakeup() method has been deprecated as it implements
49+
__serialize() and __unserialize() which need to be overwritten instead.
50+
(TysonAndre)
51+
52+
- Standard:
53+
. Unserializing the uppercase 'S' tag is now deprecated. (timwolla)
54+
55+
- Streams:
56+
. Implemented GH-15155 (Stream context is lost when custom stream wrapper is
57+
being filtered). (Quentin Dreyer)
58+
59+
- XML:
60+
. The xml_set_object() function has been deprecated. (Girgias)
61+
. Passing non-callable strings to the xml_set_*_handler() functions is now
62+
deprecated. (Girgias)
63+
64+
01 Aug 2024, PHP 8.4.0alpha4
65+
66+
- GMP:
67+
. RFC: Change GMP bool cast behavior. (Saki Takamachi)
68+
69+
01 Aug 2024, PHP 8.4.0alpha3
470

571
- Core:
672
. Fix GH-14978 (The xmlreader extension phpize build). (Peter Kokot)
773
. Throw Error exception when encountering recursion during comparison, rather
874
than fatal error. (ilutov)
75+
. Added missing cstddef include for C++ builds. (cmb)
76+
. Fixed bug GH-15108 (Segfault when destroying generator during shutdown).
77+
(Arnaud)
978

1079
- BCMath:
1180
. Adjust bcround()'s $mode parameter to only accept the RoundingMode
@@ -20,13 +89,17 @@ PHP NEWS
2089
. /dev/poll events.mechanism for Solaris/Illumos setting had been retired.
2190
(David Carlier)
2291

92+
- GMP:
93+
. The GMP class is now final and cannot be extended anymore. (Girgias)
94+
2395
- Intl:
2496
. Added SpoofChecker::setAllowedChars to set unicode chars ranges.
2597
(David Carlier)
98+
. Fixed bug GH-15087 (IntlChar::foldCase()'s $option is not optional). (cmb)
2699

27100
- Opcache:
28101
. Fixed bug GH-13775 (Memory leak possibly related to opcache SHM placement).
29-
(Arnaud)
102+
(Arnaud, nielsdos)
30103

31104
- OpenSSL:
32105
. Bumped minimum required OpenSSL version to 1.1.0. (cmb)
@@ -41,13 +114,27 @@ PHP NEWS
41114
. pg_convert/pg_insert/pg_update/pg_delete ; regexes are now cached.
42115
(David Carlier)
43116

117+
- Random:
118+
. Fixed bug GH-15094 (php_random_default_engine() is not C++ conforming).
119+
(cmb)
120+
121+
- Readline:
122+
. Fixed readline_info, rl_line_buffer_length/rl_len globals on update.
123+
(David Carlier)
124+
44125
- Standard:
45126
. Fix references in request_parse_body() options array. (nielsdos)
46127
. Add RoundingMode enum. (timwolla, saki)
47128

48129
- Tidy:
49130
. Failures in the constructor now throw exceptions rather than emitting
50131
warnings and having a broken object. (nielsdos)
132+
. Add tidyNode::getNextSibling() and tidyNode::getPreviousSibling().
133+
(nielsdos)
134+
135+
- XMLReader:
136+
. Fixed bug GH-15123 (var_dump doesn't actually work on XMLReader).
137+
(nielsdos)
51138

52139
- XSL:
53140
. Fix trampoline leak in xpath callables. (nielsdos)

README.REDIST.BINS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
18. avifinfo (ext/standard/libavifinfo) see ext/standard/libavifinfo/LICENSE
1919
19. xxHash (ext/hash/xxhash)
2020
20. Lexbor (ext/dom/lexbor/lexbor) see ext/dom/lexbor/LICENSE
21-
21+
21. Portions of libcperciva (ext/hash/hash_sha_{ni,sse2}.c) see the header in the source file
2222

2323
3. pcre2lib (ext/pcre)
2424

UPGRADING

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ PHP 8.4 UPGRADE NOTES
3333
now 13 bytes longer. Total length is platform-dependent.
3434
. Encountering recursion during comparison now results in a Error exception,
3535
rather than a fatal error.
36+
. Indirect modification of readonly properties within __clone() is no longer
37+
allowed, e.g. $ref = &$this->readonly. This was already forbidden for
38+
readonly initialization, and was an oversight in the "readonly
39+
reinitialization during cloning" implementation.
3640

3741
- DOM:
3842
. Added DOMNode::compareDocumentPosition() and DOMNode::DOCUMENT_POSITION_*
@@ -48,6 +52,13 @@ PHP 8.4 UPGRADE NOTES
4852
object. This is no longer possible, and cloning a DOMXPath object now throws
4953
an error.
5054

55+
- GMP:
56+
. The GMP class is now final and cannot be extended anymore.
57+
RFC: https://wiki.php.net/rfc/gmp-final
58+
. Casting a GMP object to bool changed so that 0 becomes false and everything else
59+
becomes true.
60+
RFC: https://wiki.php.net/rfc/fix_up_bcmath_number_class
61+
5162
- Intl:
5263
. resourcebundle_get(), ResourceBundle::get(), and accessing offsets on a
5364
ResourceBundle object now throw:
@@ -182,7 +193,7 @@ PHP 8.4 UPGRADE NOTES
182193
This means that xml_set_object() must now always be called prior to setting
183194
method names as callables.
184195
Passing an empty string to disable the handler is still allowed,
185-
but not recommended.
196+
but deprecated.
186197

187198
- XMLReader:
188199
. Passing an invalid character encoding to XMLReader::open() or
@@ -390,13 +401,31 @@ PHP 8.4 UPGRADE NOTES
390401
- Core:
391402
. Implicitly nullable parameter types are now deprecated.
392403
RFC: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
404+
. Passing E_USER_ERROR to trigger_error() is now deprecated.
405+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
393406

394407
- Curl:
395408
. The CURLOPT_BINARYTRANSFER constant is deprecated.
396409

397410
- Date:
398411
. Calling DatePeriod::__construct(string $isostr, int $options = 0) is
399412
deprecated. Use DatePeriod::createFromISO8601String() instead.
413+
. Constants SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, and
414+
SUNFUNCS_RET_DOUBLE are now deprecated, following the deprecation of
415+
the associated date_sunset() and date_sunrise() functions in PHP 8.1.
416+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
417+
418+
- DBA:
419+
. Passing null or false to dba_key_split() is deprecated.
420+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_null_and_false_to_dba_key_split
421+
422+
- DOM:
423+
. Deprecated DOM_PHP_ERR constant.
424+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_dom_php_err_constant
425+
426+
- Hash:
427+
. Deprecated passing incorrect data types for options to ext/hash functions.
428+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
400429

401430
- Intl:
402431
. Calling intlcal_set() as well as calling IntlCalendar::set() with
@@ -427,18 +456,40 @@ PHP 8.4 UPGRADE NOTES
427456
3-parameter signature with a null $row parameter instead.
428457
. Added pg_result_memory_size to get the visibility the memory used by a query result.
429458

459+
- Random:
460+
. lcg_value() is deprecated, as the function is broken in multiple ways.
461+
Use \Random\Randomizer::getFloat() instead.
462+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
463+
430464
- Reflection:
431465
. Calling ReflectionMethod::__construct() with 1 argument is deprecated.
432466
Use ReflectionMethod::createFromMethodName() instead.
433467

434468
- Session:
435469
. Calling session_set_save_handler() with more than 2 arguments is
436470
deprecated. Use the 2-parameter signature instead.
471+
. Changing the INI settings session.sid_length and session.sid_bits_per_character
472+
is deprecated. Update the session storage backend to accept 32 character
473+
hexadecimal session IDs and stop changing these two INI settings.
474+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
475+
476+
- SPL:
477+
. The SplFixedArray::__wakeup() method has been deprecated as it implements
478+
__serialize() and __unserialize() which need to be overwritten instead.
437479

438480
- Standard:
439481
. Calling stream_context_set_option() with 2 arguments is deprecated.
440482
Use stream_context_set_options() instead.
441483
. Raising zero to the power of negative number is deprecated.
484+
. Unserializing strings using the uppercase 'S' tag is deprecated.
485+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
486+
487+
- XML:
488+
. The xml_set_object() function has been deprecated.
489+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#xml_set_object_and_xml_set_handler_with_string_method_names
490+
. Passing non-callable strings to the xml_set_*_handler() functions is now
491+
deprecated.
492+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#xml_set_object_and_xml_set_handler_with_string_method_names
442493

443494
========================================
444495
5. Changed Functions
@@ -576,8 +627,9 @@ PHP 8.4 UPGRADE NOTES
576627
decimal number and round it to 0.29. However, "pre-rounding" incorrectly rounds
577628
certain numbers, so this fix removes "pre-rounding" and changes the way numbers
578629
are compared, so that the values are correctly rounded as decimal numbers.
579-
. The maximum precision that can be handled by round() has been extended by
580-
one digit.
630+
. The maximum precision that can be handled by round() has been extended by one
631+
digit. For example, `round(4503599627370495.5)` returned in `4503599627370495.5`,
632+
but now returns `4503599627370496`.
581633
. The default value of the 'cost' option for PASSWORD_BCRYPT for password_hash()
582634
has been increased from '10' to '12'.
583635

@@ -667,6 +719,9 @@ PHP 8.4 UPGRADE NOTES
667719
array_any().
668720
RFC: https://wiki.php.net/rfc/array_find
669721

722+
- Tidy:
723+
. Added tidyNode::getNextSibling() and tidyNode::getPreviousSibling().
724+
670725
- XMLReader:
671726
. Added XMLReader::fromStream(), XMLReader::fromUri(), XMLReader::fromString().
672727
RFC: https://wiki.php.net/rfc/xmlreader_writer_streams
@@ -731,6 +786,10 @@ PHP 8.4 UPGRADE NOTES
731786
- Date:
732787
. The class constants are typed now.
733788

789+
- DOM:
790+
. Removed DOMImplementation::getFeature().
791+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_domimplementationgetfeature_feature_version
792+
734793
- Intl:
735794
. The class constants are typed now.
736795
. The behaviour of Intl class has been normalized to always throw Error
@@ -909,6 +968,10 @@ PHP 8.4 UPGRADE NOTES
909968
. Improved the performance of FTP uploads up to a factor of 10x for large
910969
uploads.
911970

971+
- Hash:
972+
. Added SSE2 and SHA-NI implementations of SHA-256. This improves the performance
973+
on supported CPUs by ~1.3x (SSE2) and 3x - 5x (SHA-NI).
974+
912975
- MBString:
913976
. The performance of strspn() and strcspn() is greatly improved.
914977
They now run in linear time instead of being bounded by quadratic time.

0 commit comments

Comments
 (0)