Skip to content

Commit fed7a9f

Browse files
committed
moved Exception|Error BC Break changes to incompatible.xml part II.
1 parent 35ce39c commit fed7a9f

File tree

2 files changed

+57
-50
lines changed

2 files changed

+57
-50
lines changed

appendices/migration85/incompatible.xml

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@
199199
The extension now requires at least ICU 57.1.
200200
</simpara>
201201

202+
<simpara>
203+
<methodname>IntlDateFormatter::setTimeZone</methodname>/<function>datefmt_set_timezone</function>
204+
now throws an <exceptionname>IntlException</exceptionname> on uninitialised
205+
classes/clone failures.
206+
</simpara>
207+
202208
<simpara>
203209
All <classname>Locale</classname> methods now throw a
204210
<exceptionname>ValueError</exceptionname> when the locale argument contain null bytes.
@@ -368,22 +374,54 @@
368374

369375
</sect2>
370376

377+
<sect2 xml:id="migration85.other-changes.functions.pdo-sqlite">
378+
<title>PDO_SQLITE</title>
379+
380+
<simpara>
381+
SQLite <methodname>PDO::quote</methodname> will now throw an exception
382+
or emit a warning, depending on the error mode, if the string contains
383+
a null byte.
384+
</simpara>
385+
386+
<simpara>
387+
<methodname>PDO::sqliteCreateCollation</methodname> will now throw an
388+
exception if the callback has the wrong return type, making it more
389+
in line with <methodname>Pdo\Sqlite::createCollation</methodname> behavior.
390+
</simpara>
391+
392+
</sect2>
393+
371394
<sect2 xml:id="migration85.incompatible.posix">
372395
<title>POSIX</title>
373396

374397
<simpara>
375-
<function>posix_kill</function> throws a <exceptionname>ValueError</exceptionname>
376-
when the process_id argument is lower or greater than what the platform
377-
supports (signed integer or long range), <function>posix_setpgid</function>
378-
throws a <exceptionname>ValueError</exceptionname> when the process_id or
398+
<function>posix_kill</function> now throws a
399+
<exceptionname>ValueError</exceptionname> when the process_id argument is
400+
lower or greater than what the platform supports (signed integer or
401+
long range), <function>posix_setpgid</function> now throws a
402+
<exceptionname>ValueError</exceptionname> when the process_id or
379403
the process_group_id is lower than zero or greater than what the platform
380404
supports.
381405
</simpara>
382406

383407
<simpara>
384-
<function>posix_setrlimit</function> throws a <exceptionname>ValueError</exceptionname>
385-
when the hard_limit or soft_limit arguments are lower than -1 or
386-
if soft_limit is greater than hard_limit.
408+
<function>posix_setrlimit</function> now throws a
409+
<exceptionname>ValueError</exceptionname> when the hard_limit or
410+
soft_limit arguments are lower than -1 or if soft_limit is greater than
411+
hard_limit.
412+
</simpara>
413+
414+
</sect2>
415+
416+
<sect2 xml:id="migration85.incompatible.reflection">
417+
<title>Reflection</title>
418+
419+
<simpara>
420+
<methodname>ReflectionAttribute::newInstance</methodname> can now throw
421+
errors for internal attributes if the attribute was applied on an invalid
422+
target and the error was delayed from compile time to runtime via the
423+
#[\DelayedTargetValidation] attribute.
424+
<!-- RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute -->
387425
</simpara>
388426

389427
</sect2>
@@ -399,9 +437,9 @@
399437

400438
<simpara>
401439
<function>session_start</function> is stricter in regard to the options
402-
argument. It throws a <exceptionname>ValueError</exceptionname> if the array is
403-
not a hashmap, or a <exceptionname>TypeError</exceptionname> if the
404-
read_and_close value is not a valid type compatible with int.
440+
argument. It now throws a <exceptionname>ValueError</exceptionname> if
441+
the array is not a hashmap, or a <exceptionname>TypeError</exceptionname>
442+
if the read_and_close value is not a valid type compatible with int.
405443
</simpara>
406444

407445
</sect2>
@@ -427,7 +465,7 @@
427465
<function>snmp2_set</function>,
428466
<function>snmp3_get</function>,
429467
<function>snmp3_set</function>
430-
and <methodname>SNMP::__construct</methodname> throw a
468+
and <methodname>SNMP::__construct</methodname> now throw a
431469
<exceptionname>ValueError</exceptionname> when the hostname
432470
is too large, contains any null byte or if the port is given
433471
when negative or greater than 65535, timeout and retries values
@@ -457,26 +495,26 @@
457495
<simpara>
458496
<function>socket_create_listen</function>,
459497
<function>socket_bind</function> and <function>socket_sendto</function>
460-
throw a <exceptionname>ValueError</exceptionname> if the port is lower than 0
461-
or greater than 65535, and also if any of the hints array entries are
498+
now throw a <exceptionname>ValueError</exceptionname> if the port is lower
499+
than 0 or greater than 65535, and also if any of the hints array entries are
462500
indexed numerically.
463501
</simpara>
464502

465503
<simpara>
466-
<function>socket_addrinfo_lookup</function> throws a
467-
<exceptionname>TypeError</exceptionname> if any of the hints values cannot be cast
468-
to int and can throw a <exceptionname>ValueError</exceptionname> if any of these
469-
values overflow.
504+
<function>socket_addrinfo_lookup</function> now throws a
505+
<exceptionname>TypeError</exceptionname> if any of the hints values cannot
506+
be cast to int and can throw a <exceptionname>ValueError</exceptionname> if
507+
any of these values overflow.
470508
</simpara>
471509

472510
<simpara>
473511
<function>socket_set_option</function> with
474512
<constant>MCAST_LEAVE_GROUP</constant>/<constant>MCAST_LEAVE_SOURCE_GROUP</constant>
475-
options will throw an exception if the value isn't a valid object or array.
513+
options now throw an exception if the value isn't a valid object or array.
476514
</simpara>
477515

478516
<simpara>
479-
<function>socket_set_option</function> with multicast context throws a
517+
<function>socket_set_option</function> with multicast context now throws a
480518
<exceptionname>ValueError</exceptionname> when the created socket is not of
481519
<constant>AF_INET</constant>/<constant>AF_INET6</constant> family.
482520
</simpara>

appendices/migration85/other-changes.xml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@
8686
<sect3 xml:id="migration85.other-changes.functions.intl">
8787
<title>Intl</title>
8888

89-
<simpara>
90-
<methodname>IntlDateFormatter::setTimeZone</methodname>/<function>datefmt_set_timezone</function>
91-
throws an <exceptionname>IntlException</exceptionname> on uninitialised
92-
classes/clone failures.
93-
</simpara>
94-
9589
<simpara>
9690
<function>grapheme_extract</function> properly assigns
9791
<parameter>$next</parameter> value when skipping over invalid starting bytes.
@@ -199,23 +193,6 @@
199193

200194
</sect3>
201195

202-
<sect3 xml:id="migration85.other-changes.functions.pdo-sqlite">
203-
<title>PDO_SQLITE</title>
204-
205-
<simpara>
206-
SQLite <methodname>PDO::quote</methodname> will now throw an exception
207-
or emit a warning, depending on the error mode, if the string contains
208-
a null byte.
209-
</simpara>
210-
211-
<simpara>
212-
<methodname>PDO::sqliteCreateCollation</methodname> will now throw an
213-
exception if the callback has the wrong return type, making it more
214-
in line with <methodname>Pdo\Sqlite::createCollation</methodname> behavior.
215-
</simpara>
216-
217-
</sect3>
218-
219196
<sect3 xml:id="migration85.other-changes.functions.pgsql">
220197
<title>PostgreSQL</title>
221198

@@ -272,14 +249,6 @@
272249
when a class contains hooked properties.
273250
</simpara>
274251

275-
<simpara>
276-
<methodname>ReflectionAttribute::newInstance</methodname> can now throw
277-
errors for internal attributes if the attribute was applied on an invalid
278-
target and the error was delayed from compile time to runtime via the
279-
#[\DelayedTargetValidation] attribute.
280-
<!-- RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute -->
281-
</simpara>
282-
283252
</sect3>
284253

285254
<sect3 xml:id="migration85.other-changes.functions.sockets">

0 commit comments

Comments
 (0)