Skip to content

Commit 3fb4dcf

Browse files
committed
Change 3rd level list bullet + group more exceptions
1 parent 2d9bbf1 commit 3fb4dcf

File tree

1 file changed

+40
-43
lines changed

1 file changed

+40
-43
lines changed

UPGRADING

Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -53,77 +53,93 @@ PHP 8.4 UPGRADE NOTES
5353
Return value checks using is_resource() should be replaced with checks
5454
for `false`, unless specified otherwise.
5555
. DBA:
56-
> dba_open() and dba_popen() will now return Dba\Connection
56+
. dba_open() and dba_popen() will now return Dba\Connection
5757
. ODBC:
58-
> odbc_connect() and odbc_pconnect() will now return Odbc\Connection
59-
> odbc_prepare(), odbc_exec(), and various other functions will now return
58+
. odbc_connect() and odbc_pconnect() will now return Odbc\Connection
59+
. odbc_prepare(), odbc_exec(), and various other functions will now return
6060
Odbc\Result
6161
. SOAP:
62-
> SoapClient::$httpurl is now a Soap\Url object rather than a resource.
62+
. SoapClient::$httpurl is now a Soap\Url object rather than a resource.
6363
Checks using is_resource() (i.e. is_resource($client->httpurl)) should be
6464
replaced with checks for null (i.e. $client->httpurl !== null).
65-
> SoapClient::$sdl is now a Soap\Sdl object rather than a resource.
65+
. SoapClient::$sdl is now a Soap\Sdl object rather than a resource.
6666
Checks using is_resource() (i.e. is_resource($client->sdl)) should be
6767
replaced with checks for null (i.e. $client->sdl !== null).
6868

6969
- New warnings and exceptions:
70+
. Curl:
71+
. curl_multi_select throws a ValueError if the timeout argument if it's negative
72+
or greater than PHP_INT_MAX.
73+
. GD:
74+
. imagejpeg/imagewebp/imagepng/imageavif throws an exception if an invalid
75+
quality parameter value is passed. In addition, imageavif will throw an exception
76+
if an invalid speed parameter value is passed.
77+
. imagescale throws an exception if the width/height argument underflows/overflows or
78+
if the mode argument is invalid.
79+
imagefilter with IMG_FILTER_SCATTER throws an exception if the sub/plus arguments
80+
underflows/overflows.
81+
. Gettext:
82+
. bind_textdomain_codeset, textdomain and d(*)gettext functions now throw an exception
83+
if the domain argument is empty.
7084
. Intl:
71-
> resourcebundle_get(), ResourceBundle::get(), and accessing offsets on a
85+
. resourcebundle_get(), ResourceBundle::get(), and accessing offsets on a
7286
ResourceBundle object now throw:
7387
- TypeError for invalid offset types
7488
- ValueError for an empty string
7589
- ValueError if the integer index does not fit in a signed 32 bit integer
90+
. IntlDateFormatter::__construct() throws a ValueError if the locale is invalid.
91+
. NumberFormatter::__construct() throws a ValueError if the locale is invalid.
7692
. MBString:
77-
> mb_encode_numericentity() and mb_decode_numericentity() now check that
93+
. mb_encode_numericentity() and mb_decode_numericentity() now check that
7894
the $map is only composed of integers, if not a ValueError is thrown.
79-
> mb_http_input() now always throws a ValueError if the $type is invalid.
80-
> mb_http_output() now checks that the $encoding parameter does not
95+
. mb_http_input() now always throws a ValueError if the $type is invalid.
96+
. mb_http_output() now checks that the $encoding parameter does not
8197
contain any null bytes. If it does, a ValueError is now thrown.
8298
. ODBC:
83-
> odbc_fetch_row() returns false when a value less than or equal to 0 is
99+
. odbc_fetch_row() returns false when a value less than or equal to 0 is
84100
passed for parameter $row. Now, a warning is emitted in this case.
85101
. PCNTL:
86-
> The functions pcntl_sigprocmask(), pcntl_sigwaitinfo() and
102+
. The functions pcntl_sigprocmask(), pcntl_sigwaitinfo() and
87103
pcntl_sigtimedwait() now throw:
88104
- A ValueError if the $signals array is empty (except for
89105
pcntl_sigprocmask() if the $mode is SIG_SETMASK).
90106
- A TypeError if a value of the $signals array is not an integer
91107
- A ValueError if a value of the $signals array is not a valid signal number
92-
> The function pcntl_sigprocmask() now throw:
108+
. The function pcntl_sigprocmask() now throw:
93109
- A ValueError if $mode is not one of SIG_BLOCK, SIG_UNBLOCK, or SIG_SETMASK
94-
> The function pcntl_sigtimedwait() now throw:
110+
. The function pcntl_sigtimedwait() now throw:
95111
- A ValueError if $seconds is less than 0
96112
- A ValueError if $nanoseconds is less than 0 or greater than 1e9
97113
- A ValueError if both $seconds and $nanoseconds are 0
98114
. SimpleXML:
99-
> Calling simplexml_import_dom() with a non-XML object now throws a
115+
. Calling simplexml_import_dom() with a non-XML object now throws a
100116
TypeError instead of a ValueError.
101117
. Standard:
102-
> round() now validates the value of the $mode parameter and throws a
118+
. round() now validates the value of the $mode parameter and throws a
103119
ValueError for invalid modes. Previously invalid modes would have been
104120
interpreted as PHP_ROUND_HALF_UP.
105-
> The str_getcsv() function now throws ValueErrors when the $separator and
121+
. The str_getcsv() function now throws ValueErrors when the $separator and
106122
$enclosure arguments are not one byte long, or if the $escape is not one
107123
byte long or the empty string. This aligns the behaviour to be identical
108124
to that of fputcsv() and fgetcsv().
109-
> php_uname() now throws ValueErrors if the $move parameter is invalid.
110-
> The "allowed_classes" option for unserialize() now throws TypeErrors and
125+
. php_uname() now throws ValueErrors if the $move parameter is invalid.
126+
. The "allowed_classes" option for unserialize() now throws TypeErrors and
111127
ValueErrors if it is not an array of class names.
112128
. XMLReader:
113-
> Passing an invalid character encoding to XMLReader::open() or
129+
. Passing an invalid character encoding to XMLReader::open() or
114130
XMLReader::XML() now throws a ValueError.
115-
> Passing a string containing NULL bytes previously emitted a
131+
. Passing a string containing NULL bytes previously emitted a
116132
warning and now throws a ValueError as well.
117133
. XMLWriter:
118-
> Passing a string containing NULL bytes previously emitted a
134+
. Passing a string containing NULL bytes previously emitted a
119135
warning and now throws a ValueError as well.
120136
. XSL:
121-
> XSLTProcessor::setParameter() will now throw a ValueError when its
137+
. XSLTProcessor::setParameter() will now throw a ValueError when its
122138
arguments contain null bytes. This never actually worked correctly in
123139
the first place, which is why it throws an exception nowadays.
124-
> Calling XSLTProcessor::importStyleSheet() with a non-XML object now
140+
. Calling XSLTProcessor::importStyleSheet() with a non-XML object now
125141
throws a TypeError instead of a ValueError.
126-
> Failure to call a PHP function callback during evaluation now throws
142+
. Failure to call a PHP function callback during evaluation now throws
127143
instead of emitting a warning.
128144
RFC: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl
129145

@@ -607,34 +623,15 @@ PHP 8.4 UPGRADE NOTES
607623
. trigger_error() and user_error() now have a return type of true instead of
608624
bool.
609625

610-
- Curl:
611-
. curl_multi_select throws a ValueError if the timeout argument if it's negative
612-
or greater than PHP_INT_MAX.
613-
614626
- DOM:
615627
. DOMDocument::registerNodeClass() now has a tentative return type of true.
616628
Previously, the return type was bool but only true could be returned in practice.
617629

618-
- GD:
619-
. imagejpeg/imagewebp/imagepng/imageavif throws an exception if an invalid
620-
quality parameter value is passed. In addition, imageavif will throw an exception
621-
if an invalid speed parameter value is passed.
622-
. imagescale throws an exception if the width/height argument underflows/overflows or
623-
if the mode argument is invalid.
624-
imagefilter with IMG_FILTER_SCATTER throws an exception if the sub/plus arguments
625-
underflows/overflows.
626-
627-
- Gettext:
628-
. bind_textdomain_codeset, textdomain and d(*)gettext functions now throw an exception
629-
if the domain argument is empty.
630-
631630
- Hash:
632631
. Changed the return type of hash_update() to true. It was already the case that only
633632
true could be returned, but the stub was not updated yet.
634633

635634
- Intl:
636-
. IntlDateFormatter::__construct() throws a ValueError if the locale is invalid.
637-
. NumberFormatter::__construct() throws a ValueError if the locale is invalid.
638635
. NumberFormatter::ROUND_TOWARD_ZERO and NumberFormatter::ROUND_AWAY_FROM_ZERO
639636
have been added as aliases for NumberFormatter::ROUND_DOWN and
640637
NumberFormatter::ROUND_UP to be consistent with the new PHP_ROUND_* modes.

0 commit comments

Comments
 (0)