[wp-trac] [WordPress Trac] #55603: PHP 8.2: address deprecation of the utf8_encode() and utf8_decode() functions

WordPress Trac noreply at wordpress.org
Thu Apr 4 10:41:01 UTC 2024


#55603: PHP 8.2: address deprecation of the utf8_encode() and utf8_decode()
functions
-------------------------------------------------+-------------------------
 Reporter:  jrf                                  |       Owner:  (none)
     Type:  task (blessed)                       |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.6
Component:  General                              |     Version:  6.0
 Severity:  normal                               |  Resolution:
 Keywords:  2nd-opinion php82 dev-feedback has-  |     Focuses:  coding-
  patch has-unit-tests                           |  standards
-------------------------------------------------+-------------------------

Comment (by afercia):

 @SergeyBiryukov, @poena, and I had a look at this ticket in a mob coding
 session. We do support @jrf proposal to require the `mbstring` extension
 as that appears to be the most future-proof way to address this issue.

 We think a polyfill wouldn't be ideal because of the important point
 raised by @jrf:

 > As most uses of these functions are likely to be incorrect usage
 (especially in plugins), these "bugs" will remain and not be reviewed or
 addressed, undercutting the improvement PHP is trying to make.

 Reminder:
 > * 1 x `utf8_encode()` in `tests/phpunit/tests/kses/php`

 This instance of `utf8_encode()` was already removed in [57861].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55603#comment:75>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list