Skip to content

Commit 10e1634

Browse files
committed
Format UPGRADING
1 parent aff46d7 commit 10e1634

File tree

1 file changed

+66
-59
lines changed

1 file changed

+66
-59
lines changed

UPGRADING

+66-59
Original file line numberDiff line numberDiff line change
@@ -26,52 +26,52 @@ PHP 8.3 UPGRADE NOTES
2626
(`fiber.stack_size-zend.reserved_stack_size` for fibers).
2727
. Executing proc_get_status() multiple times will now always return the right
2828
value on posix systems. Previously, only the first call of the function
29-
returned the right value. Executing proc_close() after proc_get_status() will
30-
now also return the right exit code. Previously this would return -1.
29+
returned the right value. Executing proc_close() after proc_get_status()
30+
will now also return the right exit code. Previously this would return -1.
3131
Internally, this works by caching the result on posix systems. If you want
3232
the old behaviour, you can check the "cached" key in the array returned by
3333
proc_get_status() to check whether the result was cached.
3434
. Zend Max Execution Timers is now enabled by default for ZTS builds on
3535
Linux.
3636
. Uses of traits with static properties will now redeclare static properties
37-
inherited from the parent class. This will create a separate static property
38-
storage for the current class. This is analogous to adding the static
39-
property to the class directly without traits.
37+
inherited from the parent class. This will create a separate static
38+
property storage for the current class. This is analogous to adding the
39+
static property to the class directly without traits.
4040
. Assigning a negative index n to an empty array will now make sure that the
4141
next index is n+1 instead of 0.
4242
. Class constant visibility variance is now correctly checked when inherited
4343
from interfaces.
44-
. WeakMaps entries whose key maps to itself (possibly transitively) may now be
45-
removed during cycle collection if the key is not reachable except by
44+
. WeakMaps entries whose key maps to itself (possibly transitively) may now
45+
be removed during cycle collection if the key is not reachable except by
4646
iterating over the WeakMap (reachability via iteration is considered weak).
4747
Previously, such entries would never be automatically removed.
4848

4949
- DOM:
5050
. DOMChildNode::after(), DOMChildNode::before(), DOMChildNode::replaceWith()
51-
on a node that has no parent is now a no-op instead of a hierarchy exception,
52-
which is the behaviour spec demands.
53-
. Using the DOMParentNode and DOMChildNode methods without a document now works
54-
instead of throwing a HIERARCHY_REQUEST_ERR DOMException. This is in line with
55-
the behaviour spec demands.
56-
. createAttributeNS() without specifying a prefix would incorrectly create a default
57-
namespace, placing the element inside the namespace instead of the attribute.
58-
This bug is now fixed.
59-
. createAttributeNS() would previously incorrectly throw a NAMESPACE_ERR when the
60-
prefix was already used for a different uri. It now correctly chooses a
61-
different prefix when there's a prefix name conflict.
51+
on a node that has no parent is now a no-op instead of a hierarchy
52+
exception, which is the behaviour spec demands.
53+
. Using the DOMParentNode and DOMChildNode methods without a document now
54+
works instead of throwing a HIERARCHY_REQUEST_ERR DOMException. This is in
55+
line with the behaviour spec demands.
56+
. createAttributeNS() without specifying a prefix would incorrectly create
57+
a default namespace, placing the element inside the namespace instead of
58+
the attribute. This bug is now fixed.
59+
. createAttributeNS() would previously incorrectly throw a NAMESPACE_ERR
60+
when the prefix was already used for a different uri. It now correctly
61+
chooses a different prefix when there's a prefix name conflict.
6262

6363
- FFI:
6464
. C functions that have a return type of void now return null instead of
6565
returning the following object object(FFI\CData:void) { }
6666

6767
- Opcache:
6868
. The opcache.consistency_checks INI directive was removed. This feature was
69-
broken with the tracing JIT, as well as with inheritance cache, and has been
70-
disabled without a way to enable it since PHP 8.1.18 and PHP 8.2.5. Both the
71-
tracing JIT and inheritance cache may modify shm after the script has been
72-
persisted, invalidating its checksum. The attempted fix skipped over the
73-
modifiable pointers but was rejected due to complexity. For this reason, it
74-
was decided to remove the feature instead.
69+
broken with the tracing JIT, as well as with inheritance cache, and has
70+
been disabled without a way to enable it since PHP 8.1.18 and PHP 8.2.5.
71+
Both the tracing JIT and inheritance cache may modify shm after the script
72+
has been persisted by invalidating its checksum. The attempted fix skipped
73+
over the modifiable pointers but was rejected due to complexity. For this
74+
reason, it was decided to remove the feature instead.
7575

7676
- Phar:
7777
. The type of Phar class constants are now declared.
@@ -117,7 +117,8 @@ PHP 8.3 UPGRADE NOTES
117117
. Added the #[\Override] attribute to check that a method exists
118118
in a parent class or implemented interface.
119119
RFC: https://wiki.php.net/rfc/marking_overriden_methods
120-
. Class constants can now be accessed dynamically using the C::{$name} syntax.
120+
. Class constants can now be accessed dynamically using the C::{$name}
121+
syntax.
121122
RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch
122123
. Static variable initializers can now contain arbitrary expressions.
123124
RFC: https://wiki.php.net/rfc/arbitrary_static_variable_initializers
@@ -133,20 +134,21 @@ PHP 8.3 UPGRADE NOTES
133134
- Posix
134135
. posix_getrlimit() now takes an optional $res parameter to allow fetching a
135136
single resource limit.
136-
. posix_isatty() now raises type warnings for integers following the usual ZPP semantics
137-
. posix_ttyname() now raises type warnings for integers following the usual ZPP semantics
138-
and value warnings for invalid file descriptor integers.
137+
. posix_isatty() now raises type warnings for integers following the usual
138+
ZPP semantics.
139+
. posix_ttyname() now raises type warnings for integers following the usual
140+
ZPP semantics and value warnings for invalid file descriptor integers.
139141

140142
- Streams
141-
. Streams can now emit the STREAM_NOTIFY_COMPLETED notification. This was previously
142-
not implemented.
143+
. Streams can now emit the STREAM_NOTIFY_COMPLETED notification. This was
144+
previously not implemented.
143145

144146
========================================
145147
3. Changes in SAPI modules
146148
========================================
147149

148-
- $_SERVER['SERVER_SOFTWARE'] value from the built-in CLI server changed
149-
to make it compliant with RFC3875.
150+
- $_SERVER['SERVER_SOFTWARE'] value from the built-in CLI server changed to
151+
make it compliant with RFC3875.
150152

151153
========================================
152154
4. Deprecated Functionality
@@ -198,8 +200,8 @@ PHP 8.3 UPGRADE NOTES
198200

199201
- SQLite3
200202
. Using exceptions is now preferred, warnings will be removed in the future.
201-
Calling SQLite3::enableExceptions(false) will trigger a depreciation warning
202-
in this version.
203+
Calling SQLite3::enableExceptions(false) will trigger a depreciation
204+
warning in this version.
203205

204206
- Zip:
205207
. The ZipArchive::FL_RECOMPRESS constant is deprecated and will be removed
@@ -236,8 +238,8 @@ PHP 8.3 UPGRADE NOTES
236238
<pre> tag. The outer <span> has been merged with <code>.
237239

238240
- Calendar
239-
. easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit systems,
240-
previously it only supported years in the range from 1970 to 2037.
241+
. easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit
242+
systems, previously it only supported years in the range from 1970 to 2037.
241243

242244
- Curl:
243245
. curl_getinfo() now supports two new constants: CURLINFO_CAPATH and
@@ -246,11 +248,11 @@ PHP 8.3 UPGRADE NOTES
246248

247249
- Dom:
248250
. Changed DOMCharacterData::appendData() tentative return type to true.
249-
. DOMDocument::loadHTML(), DOMDocument::loadHTMLFile(), DOMDocument::loadXML(),
250-
and DOMDocument::loadXMLFile() now have a tentative return type of bool.
251-
Previously, this was documented as having a return type of DOMDocument|bool,
252-
but DOMDocument cannot be returned since PHP 8.0 as it is no longer statically
253-
callable.
251+
. DOMDocument::loadHTML(), DOMDocument::loadHTMLFile(),
252+
DOMDocument::loadXML() and DOMDocument::loadXMLFile() now have a tentative
253+
return type of bool. Previously, this was documented as having a return
254+
type of DOMDocument|bool, but DOMDocument cannot be returned since PHP 8.0
255+
as it is no longer statically callable.
254256

255257
- Gd:
256258
. Changed imagerotate signature, removed the `ignore_transparent` argument
@@ -321,8 +323,8 @@ PHP 8.3 UPGRADE NOTES
321323
- Random:
322324
. Changed mt_srand() and srand() to not check the number of arguments to
323325
determine whether a random seed should be used. Passing null will generate
324-
a random seed, 0 will use zero as the seed. The functions are now consistent
325-
with Mt19937::__construct().
326+
a random seed, 0 will use zero as the seed. The functions are now
327+
consistent with Mt19937::__construct().
326328

327329
- Reflection:
328330
. Return type of ReflectionClass::getStaticProperties() is no longer nullable.
@@ -338,13 +340,15 @@ PHP 8.3 UPGRADE NOTES
338340
. array_pad() is now only limited by the maximum number of elements an array
339341
can have. Before, it was only possible to add at most 1048576 elements at a
340342
time.
341-
. strtok() raises a warning in the case token is not provided when starting tokenization.
343+
. strtok() raises a warning in the case token is not provided when starting
344+
tokenization.
342345
. password_hash() will now chain the underlying Random\RandomException
343346
as the ValueError’s $previous Exception when salt generation fails.
344347
. proc_open() $command array must now have at least one non empty element.
345-
. array_sum() and array_product() now warn when values in the array cannot be converted to int/float.
346-
Previously arrays and objects where ignored whilst every other value was cast to int.
347-
Moreover, objects that define a numeric cast (e.g. GMP) are now casted instead of ignored.
348+
. array_sum() and array_product() now warn when values in the array cannot
349+
be converted to int/float. Previously arrays and objects where ignored
350+
whilst every other value was cast to int. Moreover, objects that define
351+
a numeric cast (e.g. GMP) are now casted instead of ignored.
348352
RFC: https://wiki.php.net/rfc/saner-array-sum-product
349353
. number_format() $decimal parameter handles rounding to negative places. It
350354
means that when $decimals is negative, $num is rounded to $decimals
@@ -386,7 +390,8 @@ PHP 8.3 UPGRADE NOTES
386390
as partial replacements for the overloaded IntlCalendar::set() method.
387391
. Added IntlGregorianCalendar::createFromDate() and
388392
IntlGregorianCalendar::createFromDateTime()
389-
as partial replacements for the overloaded IntlGregorianCalendar constructor.
393+
as partial replacements for the overloaded IntlGregorianCalendar
394+
constructor.
390395

391396
- JSON:
392397
. Added json_validate(), which returns whether the json is valid for
@@ -404,8 +409,10 @@ PHP 8.3 UPGRADE NOTES
404409
- Posix:
405410
. Added posix_sysconf call to get runtime informations.
406411
. Added posix_pathconf call to get configuration value from a directory/file.
407-
. Added posix_fpathconf call to get configuration value from a file descriptor.
408-
. Added posix_eaccess call to check the effective user id's permission for a path.
412+
. Added posix_fpathconf call to get configuration value from a file
413+
descriptor.
414+
. Added posix_eaccess call to check the effective user id's permission for
415+
a path.
409416

410417
- PGSQL:
411418
. Added pg_set_error_context_visibility to set the visibility of the context
@@ -450,8 +457,8 @@ PHP 8.3 UPGRADE NOTES
450457

451458
- Core:
452459
. WeakMaps now have ephemeron-like behavior: Entries whose key maps to itself
453-
(possibly transitively) may be removed during cycle collection if the key is
454-
not reachable except by iterating over the WeakMap (reachability via
460+
(possibly transitively) may be removed during cycle collection if the key
461+
is not reachable except by iterating over the WeakMap (reachability via
455462
iteration is considered weak). Previously, such entries would never be
456463
automatically removed. (See GH-10932.)
457464
. The ++ and -- operators now emit warnings when attempting to increment
@@ -469,8 +476,8 @@ PHP 8.3 UPGRADE NOTES
469476
- SQLite3
470477
. The SQLite3 class now throws \SQLite3Exception (extends \Exception) instead
471478
of \Exception.
472-
. The SQLite error code is now passed in the exception error code instead of being
473-
included in the error message.
479+
. The SQLite error code is now passed in the exception error code instead of
480+
being included in the error message.
474481

475482
========================================
476483
10. New Global Constants
@@ -621,13 +628,13 @@ PHP 8.3 UPGRADE NOTES
621628
. An Error is now thrown when the process call stack exceeds a certain size,
622629
to prevent stack-overflow-induced segmentation faults, with the goal of
623630
making debugging easier. The maximum allowed stack size is controlled
624-
by the INI directives zend.max_allowed_stack_size, zend.reserved_stack_size,
625-
and fiber.stack_size.
631+
by the INI directives zend.max_allowed_stack_size,
632+
zend.reserved_stack_size and fiber.stack_size.
626633

627634
- FFI:
628-
. FFI::load() is now allowed during preloading when opcache.preload_user is the
629-
current system user. Previously, calling FFI::load() was not possible during
630-
preloading if the opcache.preload_user directive was set.
635+
. FFI::load() is now allowed during preloading when opcache.preload_user is
636+
the current system user. Previously, calling FFI::load() was not possible
637+
during preloading if the opcache.preload_user directive was set.
631638

632639
- FPM:
633640
. FPM CLI test now fails if the socket path is longer than supported by OS.

0 commit comments

Comments
 (0)