-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Block Processor: Rename extract_block() method for clearer documentation
#10538
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 Processor: Rename extract_block() method for clearer documentation
#10538
Conversation
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe 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
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
| * } | ||
| */ | ||
| public function extract_block(): ?array { | ||
| public function extract_full_block_and_advance(): ?array { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
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.
93a5e80 to
1db51c0
Compare
…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
…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
…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
…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
…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
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.