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

WordPress Trac noreply at wordpress.org
Tue Jun 21 21:03:49 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):

 Thanks a lot for the reply @jrf, you are absolutely right about the
 minimum version requirement in `symfony/polyfill`, that really deal
 breaker.

 One more imperfect approach I could think of is adding WP's own
 equivalents (say, `iso8859_1_to_utf8`) based on `symfony/polyfill-php72`
 (which provides [https://github.com/symfony/polyfill-
 php72/blob/v1.26.0/Php72.php#L24 user-land polyfills]) to `utf8_encode`
 and `utf8_decode` if we cannot afford to require `ext-mbstring` yet. But
 this again comes with the MIT license legality, and is inherently a bad
 idea.

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


More information about the wp-trac mailing list