Skip to content

Commit 3c2076f

Browse files
drbytejorgsowa
authored andcommitted
Fix small typo in UPGRADING (php#16141)
1 parent 93b6310 commit 3c2076f

File tree

1 file changed

+178
-3
lines changed

1 file changed

+178
-3
lines changed

UPGRADING

Lines changed: 178 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,184 @@ PHP 8.5 UPGRADE NOTES
2525
. bzcompress() now throws a ValueError when work_factor is not between
2626
0 and 250.
2727

28-
- LDAP:
29-
. ldap_get_option() and ldap_set_option() now throw a ValueError when
30-
passing an invalid option.
28+
- Core:
29+
. The type of PHP_DEBUG and PHP_ZTS constants changed to bool.
30+
. The name of uploaded files and files created by the tempnam() function are
31+
now 13 bytes longer. Total length is platform-dependent.
32+
. Encountering recursion during comparison now results in a Error exception,
33+
rather than a fatal error.
34+
. Indirect modification of readonly properties within __clone() is no longer
35+
allowed, e.g. $ref = &$this->readonly. This was already forbidden for
36+
readonly initialization, and was an oversight in the "readonly
37+
reinitialization during cloning" implementation.
38+
. The exit (and die) language constructs now behave more like a function.
39+
They can be passed like callables, are affected by the strict_types
40+
declare statement, and now perform the usual type coercions instead of
41+
casting any non-integer value to a string.
42+
As such, passing invalid types to exit/die may now result in a TypeError
43+
being thrown.
44+
RFC: https://wiki.php.net/rfc/exit-as-function
45+
. The E_STRICT constant was deprecated and its corresponding error level was
46+
removed.
47+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant
48+
49+
- DBA:
50+
. dba_open() and dba_popen() will now return a Dba\Connection
51+
object rather than a resource. Return value checks using is_resource()
52+
should be replaced with checks for `false`.
53+
54+
- DOM:
55+
. Added DOMNode::compareDocumentPosition() and DOMNode::DOCUMENT_POSITION_*
56+
constants.
57+
If you have a method or constant with the same name, you might encounter errors
58+
if the declaration is incompatible.
59+
. Some DOM methods previously returned false or a PHP_ERR DOMException if a new
60+
node could not be allocated. They consistently throw an INVALID_STATE_ERR
61+
DOMException now. This situation is extremely unlikely though and probably
62+
will not affect you. As a result DOMImplementation::createDocument() now has
63+
a tentative return type of DOMDocument instead of DOMDocument|false.
64+
. Previously, DOMXPath objects could be cloned, but resulted in an unusable
65+
object. This is no longer possible, and cloning a DOMXPath object now throws
66+
an error.
67+
. DOMDocument::$actualEncoding, DOMDocument::config, DOMEntity::$actualEncoding,
68+
DOMEntity::$encoding, DOMEntity::$version have been deprecated.
69+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#formally_deprecate_soft-deprecated_domdocument_and_domentity_properties
70+
71+
- GMP:
72+
. The GMP class is now final and cannot be extended anymore.
73+
RFC: https://wiki.php.net/rfc/gmp-final
74+
. Casting a GMP object to bool changed so that 0 becomes false and everything else
75+
becomes true.
76+
RFC: https://wiki.php.net/rfc/fix_up_bcmath_number_class
77+
78+
- Intl:
79+
. resourcebundle_get(), ResourceBundle::get(), and accessing offsets on a
80+
ResourceBundle object now throw:
81+
- TypeError for invalid offset types
82+
- ValueError for an empty string
83+
- ValueError if the integer index does not fit in a signed 32 bit integer
84+
85+
- MBString:
86+
. mb_encode_numericentity() and mb_decode_numericentity() now check that
87+
the $map is only composed of integers, if not a ValueError is thrown.
88+
. mb_http_input() now always throws a ValueError if the $type is invalid.
89+
. mb_http_output() now checks that the $encoding parameter does not
90+
contain any null bytes. If it does, a ValueError is now thrown.
91+
. On invalid strings (those with encoding errors), mb_substr() now interprets
92+
character indices in the same manner as most other mbstring functions. This
93+
means that character indices returned by mb_strpos() can be passed to mb_substr().
94+
. For SJIS-Mac (MacJapanese) strings, character indices passed to mb_substr() now
95+
refer to the indices of the Unicode codepoints which are produced when the string
96+
is converted to Unicode. This is significant because around 40 SJIS-Mac characters
97+
convert to a sequence of multiple Unicode codepoints.
98+
99+
- MySQLnd:
100+
. The error code reported for MySQL server wait timeouts has been changed from 2006
101+
to 4031 for MySQL server versions 8.0.24 and above.
102+
103+
- ODBC:
104+
. odbc_fetch_row() returns false when a value less than or equal to 0 is
105+
passed for parameter $row. Now, a warning is emitted in this case.
106+
. odbc_connect() and odbc_pconnect() will now return an Odbc\Connection
107+
object rather than a resource. Return value checks using is_resource()
108+
should be replaced with checks for `false`.
109+
. odbc_prepare(), odbc_exec(), and various other functions will now return
110+
an Odbc\Result object rather than a resource. Return value checks using
111+
is_resource() should be replaced with checks for `false`.
112+
113+
- Opcache:
114+
. The JIT config defaults changed from opcache.jit=tracing and
115+
opcache.jit_buffer_size=0 to opcache.jit=disable and
116+
opcache.jit_buffer_size=64M, respectively. This does not affect the default
117+
behavior, the JIT is still disabled by default. However, it is now disabled
118+
through the opcache.jit setting, rather than opcache.jit_buffer_size. This
119+
may affect users who previously enabled JIT through opcache.jit_buffer_size
120+
exclusively, without also specifying a JIT mode using opcache.jit. To enable
121+
JIT, set the opcache.jit config value accordingly.
122+
. The maximum value of the opcache.interned_strings_buffer setting on 64bit
123+
architectures is now 32767 (it was previously 4095).
124+
. If JIT is enabled, PHP will now exit with a fatal error on startup in case
125+
of JIT startup initialization issues.
126+
127+
- PCNTL:
128+
. The functions pcntl_sigprocmask(), pcntl_sigwaitinfo() and
129+
pcntl_sigtimedwait() now throw:
130+
- A ValueError if the $signals array is empty (except for
131+
pcntl_sigprocmask() if the $mode is SIG_SETMASK).
132+
- A TypeError if a value of the $signals array is not an integer
133+
- A ValueError if a value of the $signals array is not a valid signal number
134+
Moreover, those functions now always return false on failure.
135+
In some case previously it could return the value -1.
136+
. The function pcntl_sigprocmask() will also now throw:
137+
- A ValueError if $mode is not one of SIG_BLOCK, SIG_UNBLOCK, or SIG_SETMASK
138+
. The function pcntl_sigtimedwait() will also now throw:
139+
- A ValueError if $seconds is less than 0
140+
- A ValueError if $nanoseconds is less than 0 or greater than 1e9
141+
- A ValueError if both $seconds and $nanoseconds are 0
142+
143+
- PCRE:
144+
. The bundled pcre2lib has been updated to version 10.44.
145+
As a consequence, this means {,3} is now recognized as a quantifier instead
146+
of as text. Furthermore, the meaning of some character classes in UCP mode
147+
has changed. Consult https://github.com/PCRE2Project/pcre2/blob/master/NEWS
148+
for a full changelog.
149+
150+
- PDO_DBLIB:
151+
. setAttribute, DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER and DBLIB_ATTR_DATETIME_CONVERT
152+
have been changed to set value as a bool.
153+
154+
- PDO_FIREBIRD:
155+
. Since some Firebird C++ APIs are used now, this extension requires a C++
156+
compiler to be built. This also implies that the extension has to be built
157+
against fbclient 3.0 or higher.
158+
. getAttribute, ATTR_AUTOCOMMIT has been changed to get the value as a bool.
159+
160+
- PDO_MYSQL:
161+
. getAttribute, ATTR_AUTOCOMMIT, ATTR_EMULATE_PREPARES, MYSQL_ATTR_DIRECT_QUERY have
162+
been changed to get values as bool.
163+
164+
- PDO_PGSQL:
165+
. The DSN's credentials, when set, are given priority over their PDO
166+
constructor counterparts, being closer to the documentation states.
167+
168+
- Reflection:
169+
. Added methods ReflectionClass::newLazyGhost(),
170+
ReflectionClass::newLazyProxy(), ReflectionClass::resetAsLazyGhost(),
171+
ReflectionClass::resetAsLazyProxy(),
172+
ReflectionClass::isUninitializedLazyObject(),
173+
ReflectionClass::initializeLazyObject(),
174+
ReflectionClass::markLazyObjectAsInitialized(),
175+
ReflectionClass::getLazyInitializer(),
176+
ReflectionProperty::skipLazyInitialization(),
177+
ReflectionProperty::setRawValueWithoutLazyInitialization() and constants
178+
ReflectionClass::SKIP_*.
179+
If you have a method or constant with the same name, you might encounter
180+
errors if the declaration is incompatible.
181+
182+
- SimpleXML:
183+
. Get methods called, or casting to a string on a SimpleXMLElement will no
184+
longer implicitly reset the iterator data, unless explicitly rewound.
185+
For example, casting an element to a string within a foreach loop would
186+
cause an infinite loop because it destroyed the current iterator data.
187+
This is no longer the case as a consequence of the bugfixes for GH-12192,
188+
GH-12208, #55098.
189+
. Calling simplexml_import_dom() with a non-XML object now throws a TypeError
190+
instead of a ValueError.
191+
192+
- SOAP:
193+
. SoapClient::$httpurl is now a Soap\Url object rather than a resource.
194+
Checks using is_resource() (i.e. is_resource($client->httpurl)) should be
195+
replaced with checks for null (i.e. $client->httpurl !== null).
196+
. SoapClient::$sdl is now a Soap\Sdl object rather than a resource.
197+
Checks using is_resource() (i.e. is_resource($client->sdl)) should be
198+
replaced with checks for null (i.e. $client->sdl !== null).
199+
. SoapClient::$typemap is now an array rather than a resource.
200+
Checks using is_resource() (i.e. is_resource($client->typemap)) should be
201+
replaced with checks for null (i.e. $client->typemap !== null).
202+
. The SOAP extension gained an optional dependency on the session extension.
203+
If you build PHP without the session extension and with --enable-rtld-now,
204+
you will experience errors on startup if you also use the SOAP extension.
205+
To solve this, either don't use rtld-now or load the session extension.
31206

32207
- SPL:
33208
. ArrayObject no longer accepts enums, as modifying the $name or $value

0 commit comments

Comments
 (0)