Commit 66bf3dc
authored
ext/intl: correct the 8.4.0 Error normalization, it only concerns cloning (#5798)
Only the clone path changed in 8.4.0. Throwing an Error when a method is
called on a non-initialized Intl object is not new: the macros doing so
date back to 2012 and PHP 8.3 behaves identically. Saying the classes
"always throw" is also falsifiable on 8.4: UConverter::convert() returns
false, ResourceBundle::get() returns null and Collator::getAttribute()
returns -1 on a non-initialized object.
What 8.4.0 changed is the clone handlers, and both of their branches
matter: refusing to clone a non-initialized object, and an initialized
object whose ICU clone() call fails. Formerly most classes threw a base
Exception there, and Spoofchecker raised an uncatchable fatal error.
- reference/intl/book.xml: restate the note accordingly
- appendices/migration84/other-changes.xml: fix the same overstatement in
the migration entry so both places agree
Sources
- php-src 33f1cf202ef ("ext/intl: Various refactoring", php-src#14360):
"Normalize cloning error handling behaviour - Always throw a Error
exception as we cannot progress from here". Only clone paths and idn.c
are touched, no INTL_METHOD_CHECK_STATUS macro.
- UPGRADING (PHP 8.4) section 9, added by cd44826c1af
- Pre-existing Error on use: a5d0c1e21b (2012-08-21), f5b421621d (2012-05-31)1 parent 5c52e84 commit 66bf3dc
2 files changed
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | | - | |
555 | | - | |
556 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
557 | 560 | | |
558 | 561 | | |
559 | 562 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
96 | 108 | | |
97 | 109 | | |
98 | 110 | | |
| |||
0 commit comments