Skip to content

Conversation

@dmsnell
Copy link
Member

@dmsnell dmsnell commented Nov 21, 2025

Trac ticket: Core-61401

In testing during the release candidacy for WordPress 6.9 it was found that the extract_block() method may do more work than is expected based off of its name.

This change renames the method to extract_full_block_and_advance() to communicate that it does move the Block Processor forward and to hint at the fact that it also encompasses all inner blocks during that advance.

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props dmsnell, westonruter, jonsurrell.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

* }
*/
public function extract_block(): ?array {
public function extract_full_block_and_advance(): ?array {
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to add extract_block as an alias method which we can warn with deprecation notice and @deprecated that it will be removed in 7.0? This would eliminate any risk for the rename. Given this change is made during RC this would seem safest.

Copy link
Member Author

Choose a reason for hiding this comment

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

that seems fine, but at the same time I figure it’s probably no safer to remove it in 7.0 than it would be now.

I’m worried that if we push it out then it will have to stay forever.

Copy link
Member

Choose a reason for hiding this comment

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

I think it's safer because there would be time to update, longer than 1½ weeks.

I don't feel strongly, however.

Copy link
Member

Choose a reason for hiding this comment

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

The class has not been in a release. It's new in 6.9. The only sites that could be impacted are those that are running trunk and relying on this brand new API. Running trunk is inherently dangerous and not recommended.

If this method needs to be renamed, it seems best to me to do a clean rename right now and avoid the need for deprecations.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am going to try and rename it before the release. It is rather new in trunk even as @sirreal mentioned. If there is any transition pain, and I hope there isn’t, I hope it will save a lot of future hassle.

@sirreal
Copy link
Member

sirreal commented Nov 24, 2025

I've approved this PR. I should note that this assumes it will be backported to 6.9.

If, for some reason, it's not included in 6.9 then the previous method would need to be restored as a deprecated method.

…ation.

In testing during the release candidacy for WordPress 6.9 it was found
that the `extract_block()` method may do more work than is expected
based off of its name.

This change renames the method to `extract_full_block_and_advance()` to
communicate that it does move the Block Processor forward and to hint at
the fact that it also encompasses all inner blocks during that advance.
@dmsnell dmsnell force-pushed the block-processor/rename-extract-block branch from 93a5e80 to 1db51c0 Compare November 24, 2025 20:25
pento pushed a commit that referenced this pull request Nov 24, 2025
…ation.

In testing during the release candidacy for WordPress 6.9 it was found
that the `extract_block()` method may do more work than is expected
based off of its name.

This change renames the method to `extract_full_block_and_advance()` to
communicate that it does move the Block Processor forward and to hint at
the fact that it also encompasses all inner blocks during that advance.

Developed in #10538
Discussed in https://core.trac.wordpress.org/ticket/61401

Follow-up to [60939].

Props dlh, dmsnell, jonsurrell, westonruter.

See #61401.


git-svn-id: https://develop.svn.wordpress.org/trunk@61294 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Nov 24, 2025
…ation.

In testing during the release candidacy for WordPress 6.9 it was found
that the `extract_block()` method may do more work than is expected
based off of its name.

This change renames the method to `extract_full_block_and_advance()` to
communicate that it does move the Block Processor forward and to hint at
the fact that it also encompasses all inner blocks during that advance.

Developed in WordPress/wordpress-develop#10538
Discussed in https://core.trac.wordpress.org/ticket/61401

Follow-up to [60939].

Props dlh, dmsnell, jonsurrell, westonruter.

See #61401.

Built from https://develop.svn.wordpress.org/trunk@61294


git-svn-id: http://core.svn.wordpress.org/trunk@60606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Nov 24, 2025
…ation.

In testing during the release candidacy for WordPress 6.9 it was found
that the `extract_block()` method may do more work than is expected
based off of its name.

This change renames the method to `extract_full_block_and_advance()` to
communicate that it does move the Block Processor forward and to hint at
the fact that it also encompasses all inner blocks during that advance.

Developed in WordPress/wordpress-develop#10538
Discussed in https://core.trac.wordpress.org/ticket/61401

Follow-up to [60939].

Props dlh, dmsnell, jonsurrell, westonruter.

See #61401.

Built from https://develop.svn.wordpress.org/trunk@61294


git-svn-id: https://core.svn.wordpress.org/trunk@60606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@dmsnell
Copy link
Member Author

dmsnell commented Nov 24, 2025

Merged in [61294]
e5b3251

@dmsnell dmsnell closed this Nov 24, 2025
@dmsnell dmsnell deleted the block-processor/rename-extract-block branch November 24, 2025 22:27
pento pushed a commit that referenced this pull request Nov 25, 2025
…ation.

In testing during the release candidacy for WordPress 6.9 it was found
that the `extract_block()` method may do more work than is expected
based off of its name.

This change renames the method to `extract_full_block_and_advance()` to
communicate that it does move the Block Processor forward and to hint at
the fact that it also encompasses all inner blocks during that advance.

Developed in #10538
Discussed in https://core.trac.wordpress.org/ticket/61401

Follow-up to [60939].

Reviewed by desrosj, jonsurrell.
Merges [61294] to the 6.9 branch.

Props dlh, dmsnell, jonsurrell, westonruter.

See #61401.


git-svn-id: https://develop.svn.wordpress.org/branches/6.9@61296 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Nov 25, 2025
…ation.

In testing during the release candidacy for WordPress 6.9 it was found
that the `extract_block()` method may do more work than is expected
based off of its name.

This change renames the method to `extract_full_block_and_advance()` to
communicate that it does move the Block Processor forward and to hint at
the fact that it also encompasses all inner blocks during that advance.

Developed in WordPress/wordpress-develop#10538
Discussed in https://core.trac.wordpress.org/ticket/61401

Follow-up to [60939].

Reviewed by desrosj, jonsurrell.
Merges [61294] to the 6.9 branch.

Props dlh, dmsnell, jonsurrell, westonruter.

See #61401.

Built from https://develop.svn.wordpress.org/branches/6.9@61296


git-svn-id: http://core.svn.wordpress.org/branches/6.9@60608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants