sabberworm / PHP-CSS-Parser

A Parser for CSS Files written in PHP. Allows extraction of CSS files into a data structure, manipulation of said structure and output as (optimized) CSS

Home Page:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 the configure 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.

ezoic increase your site revenue