Block Serialization Default Parser: Use PCRE v6.x-compatible subpattern syntax #13369
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #13310
This pull request seeks to use a PCRE 6.x-compatible subpattern syntax in the block serialization parser. See #13310 for more information for the rationale of this change.
Testing instructions:
The affected PHP code here does not override the behavior of the
WP_Block_Parser_Block
class defined in WordPress 5.x . Therefore, you must test either by using an older version of WordPress, or by manually commenting the following line in your WordPress installation (see also #11015):https://github.com/WordPress/WordPress/blob/b7897c576141adee3686056aff147ea09566c918/wp-settings.php#L258
...and applying a patch update to your local Gutenberg plugin to force the load of the bundled parser class definition:
Then, confirm there are no regressions in the behavior of the parser. For example, a dynamic block such as the Latest Posts block should display in a front-end preview.
Ensure parser tests pass: