Improve Parser backward compatibility #13310
Labels
Backwards Compatibility
Issues or PRs that impact backwards compatability
[Feature] Parsing
Related to efforts to improving the parsing of a string of data and converting it into a different f
[Type] Bug
An existing feature does not function as intended
Milestone
Describe the bug
The regular expression that the PHP parser uses the
(?<name>pattern)
syntax to create named subpatterns. This syntax was introduced in PHP 5.2.2.gutenberg/packages/block-serialization-default-parser/parser.php
Lines 376 to 382 in ddac4f3
Strictly speaking, however, the syntax was introduced in PCRE 7.0, which is the default version of PCRE built into PHP 5.2.2, but some Linux distros (Centos 5 is a known example) use an older PCRE. In the case of Centos 5, they use PCRE 6.6.
In core (as well as in other places in Gutenberg), we've avoided this problem by using the older
(?P<name>pattern)
syntax.I'd like to get this fixed in WordPress 5.1.
Ref: https://core.trac.wordpress.org/ticket/45644
The text was updated successfully, but these errors were encountered: