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

Update PHPCS rules and packages. #1

Merged
merged 5 commits into from
Jan 23, 2025
Merged

Update PHPCS rules and packages. #1

merged 5 commits into from
Jan 23, 2025

Conversation

ryanwelcher
Copy link
Contributor

The PR adds the custom rules from Newspack as referenced here.

@claudiulodro I was wondering if we need the custom sniff for this or if that is just part of the internal framework?

@ryanwelcher ryanwelcher self-assigned this Jan 23, 2025
@claudiulodro
Copy link

claudiulodro commented Jan 23, 2025

@claudiulodro I was wondering if we need the custom sniff for this or if that is just part of the internal framework?

Probably not super necessary. I'm not sure if the latest official WP sniffs care, but the custom one lets us use short array syntax ([]), not require Yoda conditionals, and other small tweaks like that. I don't think it's a huge deal if people need to use the legacy array syntax or Yoda conditionals. All our sites run on PHP 8.x, so some of the backwards compatibility for old PHP versions isn't needed.

@ryanwelcher
Copy link
Contributor Author

I'll pull out the custom one in phpSniffs for now

@ryanwelcher ryanwelcher merged commit 0c99427 into trunk Jan 23, 2025
1 of 3 checks passed
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.

2 participants