Discussion: Hard-require the mbstring PHP extension?
oliverklee opened this issue · comments
To simplify things, could we hard-require the mbstring
PHP extension via composer.json
and deprecate the corresponding setting?
(This would be a breaking change, i.e., it would make sense to time this to happen just before the 9.0.0 release.)
@sabberworm @westonruter What do you think?
We don't currently require the mbstring
extension in the AMP plugin. Also:
mbstring
is a non-default extension. This means it is not enabled by default. You must explicitly enable the module with theconfigure
option.
WordPress core does not require it, but it does polyfill mb_substr()
and mb_strlen()
. Nevertheless, php-css-parser also uses mb_strpos()
and mb_strtolower()
, which are not polyfilled in WP.
So I don't think we can safely depend on it without breaking many sites.
@westonruter Thanks! Closing then.