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.
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
Navigation Link block: register variations on post type / taxonomy registration #54801
Navigation Link block: register variations on post type / taxonomy registration #54801
Changes from all commits
6f57ab7
8e2e302
d79387e
dfa40b8
e747ba0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 these two lines maybe causing the breaking PHPUNit tests for the PHP package sync process for WordPress 6.5
WordPress/wordpress-develop#5922
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.
Maybe after #56952 was merged, we can just use the
variations_callback
function and don't need to hook into theregistered_post_type
andregistered_taxonomy
actions anymore. I can test locally.But do you have any idea as to why those hooks may cause phpunit timeouts?
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.
@getdave I've drafted up a PR which uses the now in core available
get_block_type_variations
filter instead of the hooks mentioned above. This should give us performance benefits, but also hopefully remove the problems with the unit tests you mentioned.#58389
The PR is just a draft/exploration, because it will only work when that filter is available (which is core 6.5+). So it definitely has some BC pitfalls. Happy for any feedback or if you think, that this PR should just be reverted so gutenberg can successfully be merged into core.
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.
Lets bring that in. I'll try it manually here.
PHPUnit probably registers/unregisters post types hundreds of times. That could be it? Still only a guess.
These Gutenberg changes will be for 6.5 so it should be ok. The only issue is that the Plugin should run with the last x2 versions of WP (I think) so we'd need to gate it based on the availability of the new
variations_callback
API in Core. Can we do that?