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

Classes/DeclarationCompatibility: sync with WP Core #799

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Sep 19, 2023

While looking at this sniff for something unrelated, I started wondering if the signature definitions were still in line with WP Core.

Turned out they were not, though with the current checks being done in the sniff, this wasn't necessarily problematic (though it should have been, but that's for another PR).

Also see the additional notes I've added to the review ticket.

Refs:

While looking at this sniff for something unrelated, I started wondering if the signature definitions were still in line with WP Core.

Turned out they were not, though with the current checks being done in the sniff, this wasn't necessarily problematic (though it should have been, but that's for another PR).

Also see the [additional notes I've added to the review ticket](#507 (comment)).

Refs:
* https://developer.wordpress.org/reference/classes/wp_widget/wp_widget/
* https://developer.wordpress.org/reference/classes/walker/start_el/
* https://developer.wordpress.org/reference/classes/walker/end_el/
* https://developer.wordpress.org/reference/classes/walker/unset_children/
@jrfnl jrfnl added this to the 3.x milestone Sep 19, 2023
@jrfnl jrfnl requested a review from a team as a code owner September 19, 2023 04:17
@GaryJones
Copy link
Contributor

When did those changes happen in WP core, and would this sniff, in theory, need to differentiate for folks running this sniff on a before and after version of WP core?

@jrfnl
Copy link
Collaborator Author

jrfnl commented Sep 19, 2023

When did those changes happen in WP core, and would this sniff, in theory, need to differentiate for folks running this sniff on a before and after version of WP core?

I know a lot of variable renaming has been happening since PHP 8.0 as, even though WP doesn't support named parameters, it did bring more focus on using better parameter names.

I can do a git blame to figure out exactly when, but to be honest, it's irrelevant as parameter names are not checked by the sniff (as I mention in the description above + in the comments on the other ticket).

So, while this commit improves the information contained in the sniff, it has no impact on the functionality of the sniff.

Copy link
Contributor

@GaryJones GaryJones left a comment

Choose a reason for hiding this comment

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

@GaryJones GaryJones merged commit fbcc951 into develop Sep 19, 2023
38 checks passed
@GaryJones GaryJones deleted the feature/declarationcompatibility-sync-with-wp branch September 19, 2023 10:44
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.

2 participants