[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 Feb 26 23:08:33 UTC 2024
#55603: PHP 8.2: address deprecation of the utf8_encode() and utf8_decode()
functions
--------------------------------------------+------------------------------
Reporter: jrf | Owner: hellofromTonya
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 6.5
Component: General | Version: 6.0
Severity: normal | Resolution:
Keywords: 2nd-opinion php82 dev-feedback | Focuses: coding-
| standards
--------------------------------------------+------------------------------
Comment (by swissspidy):
> I'm not following how this is a con rather than a simple observation.
What is the con?
The con is that the functions are not actually removed yet in PHP, they're
just deprecated. We can't polyfill functions that still exist. Many WP
site will be on PHP 8.2 and below for many years to come, continuing to
experience these deprecation warnings. We need to address this now, not in
X years when we raise the minimum PHP version to one where the functions
were actually removed.
---
Speaking of polyfilling though, have we considered using
https://packagist.org/packages/symfony/polyfill-mbstring instead of making
the mbstring extension mandatory? I successfully use it in some of my
plugins because mbstring is not so widely adopted as one would hope.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55603#comment:59>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list