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

WordPress Trac noreply at wordpress.org
Mon May 30 14:27:27 UTC 2022


#55603: PHP 8.2: address deprecation of the utf8_encode() and utf8_decode()
functions
-------------------------------------+-------------------------------
 Reporter:  jrf                      |       Owner:  (none)
     Type:  task (blessed)           |      Status:  new
 Priority:  normal                   |   Milestone:  6.1
Component:  General                  |     Version:  6.0
 Severity:  normal                   |  Resolution:
 Keywords:  2nd-opinion early php82  |     Focuses:  coding-standards
-------------------------------------+-------------------------------

Comment (by ayeshrajans):

 Not a core developer, but I'd strongly prefer the option 2, too.

 I apologize if I missed any part of the conversation, but I was wondering
 if we considered using `symfony/symfony/polyfill-mbstring` (contains 36
 `mb_` functions) to replace our two functions in `compat.php`. It would
 work as a stop-gap, and we can add a note if we are polyfill-ing mbstring
 asking the user to enable mbstring extension.

 In case polyfilled, `symfony/symfony/polyfill-mbstring` adds about 1,000
 LOCs to the code base, plus some unicode data to the WordPress code base,
 but it's a maintained library and we might eventually use it as a composer
 dependency rather than manually bundling it.

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


More information about the wp-trac mailing list