Skip to content

Commit 35ce39c

Browse files
committed
moved [ValueError|TypeError] BC Break changes to incompatible.xml
1 parent de74591 commit 35ce39c

File tree

2 files changed

+98
-93
lines changed

2 files changed

+98
-93
lines changed

appendices/migration85/incompatible.xml

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

202+
<simpara>
203+
All <classname>Locale</classname> methods now throw a
204+
<exceptionname>ValueError</exceptionname> when the locale argument contain null bytes.
205+
</simpara>
206+
202207
<simpara>
203208
The behaviour of <constant>Collator::SORT_REGULAR</constant> with respect to
204209
handling numeric strings is now aligned with the behaviour of
@@ -363,6 +368,26 @@
363368

364369
</sect2>
365370

371+
<sect2 xml:id="migration85.incompatible.posix">
372+
<title>POSIX</title>
373+
374+
<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
379+
the process_group_id is lower than zero or greater than what the platform
380+
supports.
381+
</simpara>
382+
383+
<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.
387+
</simpara>
388+
389+
</sect2>
390+
366391
<sect2 xml:id="migration85.incompatible.session">
367392
<title>Session</title>
368393

@@ -372,6 +397,13 @@
372397
instead of silently failing.
373398
</simpara>
374399

400+
<simpara>
401+
<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.
405+
</simpara>
406+
375407
</sect2>
376408

377409
<sect2 xml:id="migration85.incompatible.simplexml">
@@ -385,6 +417,25 @@
385417

386418
</sect2>
387419

420+
<sect2 xml:id="migration85.incompatible.snmp">
421+
<title>SNMP</title>
422+
423+
<simpara>
424+
<function>snmpget</function>,
425+
<function>snmpset</function>,
426+
<function>snmp2_get</function>,
427+
<function>snmp2_set</function>,
428+
<function>snmp3_get</function>,
429+
<function>snmp3_set</function>
430+
and <methodname>SNMP::__construct</methodname> throw a
431+
<exceptionname>ValueError</exceptionname> when the hostname
432+
is too large, contains any null byte or if the port is given
433+
when negative or greater than 65535, timeout and retries values
434+
are lower than -1 or too large.
435+
</simpara>
436+
437+
</sect2>
438+
388439
<sect2 xml:id="migration85.incompatible.soap">
389440
<title>SOAP</title>
390441

@@ -400,6 +451,38 @@
400451

401452
</sect2>
402453

454+
<sect2 xml:id="migration85.incompatible.sockets">
455+
<title>Sockets</title>
456+
457+
<simpara>
458+
<function>socket_create_listen</function>,
459+
<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
462+
indexed numerically.
463+
</simpara>
464+
465+
<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.
470+
</simpara>
471+
472+
<simpara>
473+
<function>socket_set_option</function> with
474+
<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.
476+
</simpara>
477+
478+
<simpara>
479+
<function>socket_set_option</function> with multicast context throws a
480+
<exceptionname>ValueError</exceptionname> when the created socket is not of
481+
<constant>AF_INET</constant>/<constant>AF_INET6</constant> family.
482+
</simpara>
483+
484+
</sect2>
485+
403486
<sect2 xml:id="migration85.incompatible.spl">
404487
<title>SPL</title>
405488

@@ -428,6 +511,21 @@
428511

429512
</sect2>
430513

514+
<sect2 xml:id="migration85.incompatible.tidy">
515+
<title>Tidy</title>
516+
517+
<simpara>
518+
<methodname>tidy::__construct</methodname>,
519+
<methodname>tidy::parseFile</methodname>,
520+
<methodname>tidy::parseString</methodname> now throws a
521+
<exceptionname>ValueError</exceptionname> if the configuration contains an
522+
invalid value or attempts to set a read-only internal entry,
523+
and a <exceptionname>TypeError</exceptionname> if a configuration key is not a
524+
string.
525+
</simpara>
526+
527+
</sect2>
528+
431529
</sect1>
432530
<!-- Keep this comment at the end of the file
433531
Local variables:

appendices/migration85/other-changes.xml

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@
9999
grapheme boundary instead of the end.
100100
</simpara>
101101

102-
<simpara>
103-
All <classname>Locale</classname> methods now throw a
104-
<exceptionname>ValueError</exceptionname> when the locale argument contain null bytes.
105-
</simpara>
106-
107102
<simpara>
108103
<function>transliterator_get_error_code</function>,
109104
<function>transliterator_get_error_message</function>,
@@ -258,21 +253,6 @@
258253
sets last_error to EBADF and raises an <constant>E_WARNING</constant> message.
259254
</simpara>
260255

261-
<simpara>
262-
<function>posix_kill</function> throws a <exceptionname>ValueError</exceptionname>
263-
when the process_id argument is lower or greater than what the platform
264-
supports (signed integer or long range), <function>posix_setpgid</function>
265-
throws a <exceptionname>ValueError</exceptionname> when the process_id or
266-
the process_group_id is lower than zero or greater than what the platform
267-
supports.
268-
</simpara>
269-
270-
<simpara>
271-
<function>posix_setrlimit</function> throws a <exceptionname>ValueError</exceptionname>
272-
when the hard_limit or soft_limit arguments are lower than -1 or
273-
if soft_limit is greater than hard_limit.
274-
</simpara>
275-
276256
</sect3>
277257

278258
<sect3 xml:id="migration85.other-changes.functions.reflection">
@@ -302,61 +282,9 @@
302282

303283
</sect3>
304284

305-
<sect3 xml:id="migration85.other-changes.functions.session">
306-
<title>Session</title>
307-
308-
<simpara>
309-
<function>session_start</function> is stricter in regard to the options
310-
argument. It throws a <exceptionname>ValueError</exceptionname> if the array is
311-
not a hashmap, or a <exceptionname>TypeError</exceptionname> if the read_and_close
312-
value is not a valid type compatible with int.
313-
</simpara>
314-
315-
</sect3>
316-
317-
<sect3 xml:id="migration85.other-changes.functions.snmp">
318-
<title>SNMP</title>
319-
320-
<simpara>
321-
<function>snmpget</function>,
322-
<function>snmpset</function>,
323-
<function>snmp2_get</function>,
324-
<function>snmp2_set</function>,
325-
<function>snmp3_get</function>,
326-
<function>snmp3_set</function>
327-
and <methodname>SNMP::__construct</methodname> throw a
328-
<exceptionname>ValueError</exceptionname> when the hostname
329-
is too large, contains any null byte or if the port is given
330-
when negative or greater than 65535, timeout and retries values
331-
are lower than -1 or too large.
332-
</simpara>
333-
334-
</sect3>
335-
336285
<sect3 xml:id="migration85.other-changes.functions.sockets">
337286
<title>Sockets</title>
338287

339-
<simpara>
340-
<function>socket_create_listen</function>,
341-
<function>socket_bind</function> and <function>socket_sendto</function>
342-
throw a <exceptionname>ValueError</exceptionname> if the port is lower than 0
343-
or greater than 65535, and also if any of the hints array entries are
344-
indexed numerically.
345-
</simpara>
346-
347-
<simpara>
348-
<function>socket_addrinfo_lookup</function> throws a
349-
<exceptionname>TypeError</exceptionname> if any of the hints values cannot be cast
350-
to int and can throw a <exceptionname>ValueError</exceptionname> if any of these
351-
values overflow.
352-
</simpara>
353-
354-
<simpara>
355-
<function>socket_set_option</function> with
356-
<constant>MCAST_LEAVE_GROUP</constant>/<constant>MCAST_LEAVE_SOURCE_GROUP</constant>
357-
options will throw an exception if the value isn't a valid object or array.
358-
</simpara>
359-
360288
<simpara>
361289
<function>socket_create</function>/<function>socket_bind</function> can
362290
create <constant>AF_PACKET</constant> family sockets.
@@ -367,27 +295,6 @@
367295
string representation with <constant>AF_PACKET</constant> socket.
368296
</simpara>
369297

370-
<simpara>
371-
<function>socket_set_option</function> with multicast context throws a
372-
<exceptionname>ValueError</exceptionname> when the created socket is not of
373-
<constant>AF_INET</constant>/<constant>AF_INET6</constant> family.
374-
</simpara>
375-
376-
</sect3>
377-
378-
<sect3 xml:id="migration85.other-changes.functions.tidy">
379-
<title>Tidy</title>
380-
381-
<simpara>
382-
<methodname>tidy::__construct</methodname>,
383-
<methodname>tidy::parseFile</methodname>,
384-
<methodname>tidy::parseString</methodname> now throws a
385-
<exceptionname>ValueError</exceptionname> if the configuration contains an
386-
invalid value or attempts to set a read-only internal entry,
387-
and a <exceptionname>TypeError</exceptionname> if a configuration key is not a
388-
string.
389-
</simpara>
390-
391298
</sect3>
392299

393300
<sect3 xml:id="migration85.other-changes.functions.zlib">

0 commit comments

Comments
 (0)