Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block parser updates based on removal of $empty_attrs #54770

Closed
wants to merge 2 commits into from

Conversation

dlh01
Copy link
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

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
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
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