Skip to content

Block parser updates based on removal of $empty_attrs#54770

Closed
dlh01 wants to merge 2 commits intoWordPress:fix/typesfrom
dlh01:fix/trac-59168/docs-parser
Closed

Block parser updates based on removal of $empty_attrs#54770
dlh01 wants to merge 2 commits intoWordPress:fix/typesfrom
dlh01:fix/trac-59168/docs-parser

Conversation

@dlh01
Copy link
Copy Markdown
Contributor

@dlh01 dlh01 commented Sep 25, 2023

What?

This PR updates the block parser docs and spec parser as requested here: https://core.trac.wordpress.org/ticket/59168#comment:7.

It builds on #54496, which removes the \WP_Block_Parser::$empty_attrs property as also requested in that comment.

Why?

See https://core.trac.wordpress.org/ticket/59168#comment:7.

@dlh01 dlh01 requested a review from dmsnell as a code owner September 25, 2023 02:03
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 25, 2023

Warning: Type of PR label error

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Accessibility (a11y), [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core.
  • Labels found: [Feature] Parsing.

Read more about Type labels in Gutenberg.

@Mamaduka Mamaduka added the [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f label Sep 25, 2023
Copy link
Copy Markdown
Member

@dmsnell dmsnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me. thanks for pushing this out. I do think we need to add a note in the CHANGELOG for the package, and also probably for the default-parser as well.

/*
* Fun fact! It's not trivial in PHP to create "an empty associative array" since all arrays
* are associative arrays. If we use `array()` we get a JSON `[]`
*/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we all missed this in WordPress/wordpress-develop#5049 - sorry!

@mikachan mikachan deleted the branch WordPress:fix/types October 13, 2023 23:43
@mikachan mikachan closed this Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants