[wp-trac] [WordPress Trac] #55603: PHP 8.2: address deprecation of the utf8_encode() and utf8_decode() functions
WordPress Trac
noreply at wordpress.org
Sun Apr 14 22:38:39 UTC 2024
#55603: PHP 8.2: address deprecation of the utf8_encode() and utf8_decode()
functions
-------------------------------------------------+-------------------------
Reporter: jrf | Owner:
| SergeyBiryukov
Type: task (blessed) | Status: accepted
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 peterwilsoncc):
Replying to [comment:82 knutsp]:
> I'm not sure what requires mean, will an installation or upgrade be
refused/fail, or will it just be a notice or test in Site Health?
An upgrade will be refused: during the upgrade process support is tested
and if the module is not included the upgrade will not proceed.
For sites running 6.1 or later, the available modules are sent to the
upgrade API so it can be modified not to present the upgrade to sites
without the module installed. Such sites would only be offered minor
version updates.
As Dion mentions in [comment:55 comment #55], although it's ''only'' 0.5%
of sites that don't have the module installed, at WordPress's scale that
represents a lot of sites.
> En elegant solution would be to not allow non English installation or
language addition in case `mbstring` is not included. That may require a
kind of polyfill as a short circuit and avoid fatal errors, in case non
Latin characters are introduced by user input.
I unsure about this, but may be convinced. It's possible that this would
complicate matters further than the current practice of testing if multi-
byte functions exist before using them.
> I'm all for requiring `mbstring` in general, as we who are using
European languages have extra characters in our alphabets, but I'm a bit
worried about this getting accepted by project leadership in time this is
needed for PHP versions support. And I admit that a very large portion of
WordPress installations use a variant of English only, not only as the
site language, but also for all users, and really don't need this.
It's one of those stats that can be interpreted either way.
According to the [https://wordpress.org/about/stats/ WordPress stats]
about half of sites use an English variant (US, UK, etc) and about half
use a non-English language.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55603#comment:83>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list