Skip to content

Conversation

@johnbillion
Copy link
Contributor

@johnbillion johnbillion commented Apr 19, 2023

@IanDelMar This simplifies these two parameter types so we don't need to maintain the shapes. What do you think?

In #81 I added See register_post_type() for information on accepted arguments and See register_taxonomy() for information on accepted arguments to the args descriptions in the constructors in WordPress core and then regenerated the stubs, to demonstrate how the args inheritance works. I can add those to core but we'll need to wait until WordPress 6.3 is released to benefit from them. This PR could be merged in the meantime.

@johnbillion johnbillion marked this pull request as ready for review April 19, 2023 23:22
@IanDelMar
Copy link
Contributor

Makes a lot of sense to do it that way and is much less cumbersome to maintain!

@IanDelMar
Copy link
Contributor

@szepeviktor @johnbillion's suggestion is way better than replicating the shapes. I strongly support merging this and wait for WP to update the doc block.

@szepeviktor
Copy link
Member

szepeviktor commented Apr 20, 2023

I will merge this on the day WP 6.3.0 is released.
https://make.wordpress.org/core/2023/04/14/wordpress-6-3-planning-proposal-call-for-volunteers/

Is that what you thought?

@johnbillion
Copy link
Contributor Author

You can merge this now in case we get some more releases in the 6.2.x branch, and then when 6.3 lands we'll pull it out.

@szepeviktor szepeviktor merged commit 464847c into php-stubs:master Apr 20, 2023
@johnbillion johnbillion deleted the array-shape-less branch April 27, 2023 22:03
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