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

DeclarationCompatibility: fix incorrect signature check for Walker::walk() #505

Merged
merged 1 commit into from
Jul 21, 2020

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Jul 21, 2020

... and Walker::paged_walk().

The method signature of both the Walker::walk() method as well as the Walker::paged_walk() method were changed in WordPress 5.3 to make the variadic nature of the allowed arguments explicit.

This change updates the sniff to verify the signature of these methods in child classes against the new method signature as it is in WordPress Core.

Refs:

Fixes #448

Note: I've pointedly ignored everything else which could be improved in this sniff and just focused on getting this particular issue fixed for now.

…walk()`

... and `Walker::paged_walk()`.

The method signature of both the `Walker::walk()` method as well as the `Walker::paged_walk()` method were changed in WordPress 5.3 to make the variadic nature of the allowed arguments explicit.

This changes update the sniff to verify the signature of these methods in child classes against the new method signature as it is in WordPress Core.

Refs:
* https://make.wordpress.org/core/2019/10/09/wp-5-3-introducing-the-spread-operator/
* https://core.trac.wordpress.org/changeset/46442

Fixes 448
@GaryJones GaryJones merged commit e523148 into develop Jul 21, 2020
@GaryJones GaryJones deleted the fix/448-detect-correct-walker-walk-signature branch July 21, 2020 23:05
@GaryJones GaryJones added this to the 2.2.0 milestone Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[WP 5.3] Declaration should be compatible with Walker::walk
2 participants