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 wpcs 3.0.0 #58

Merged
merged 20 commits into from
Sep 22, 2023
Merged

Conversation

dingo-d
Copy link
Contributor

@dingo-d dingo-d commented Aug 22, 2023

Description

Still a WIP due to an upstream bug: WordPress/WordPress-Coding-Standards#2370

This update will sync the CS with the latest WPCS 3.0.0, and do some quality of life improvements.

To do:

  • Update changelog with all the changes
  • Update readme with all the changes
  • Update CI checks
  • Test that everything passes
  • Test the new public property in the ComponentsEscape sniff
  • Test the new branch (once all bugs pass) on libs/projects (shouldn't block PHP 8 installation anymore)
  • Tag v2 of the Eightshift Coding Standards

.github/workflows/lint.yml Outdated Show resolved Hide resolved
@dingo-d
Copy link
Contributor Author

dingo-d commented Sep 12, 2023

To do: rebase useless commits into one.
Currently, the CI fails on WPCS 3.0.0, but that is expected as the fix is still not merged, and will be released in v3.1.0.

@dingo-d
Copy link
Contributor Author

dingo-d commented Sep 14, 2023

@goranalkovic-infinum @iruzevic if you agree, I can rebase this pr and we can merge it and tag 2.0.0-beta, because the release will depend on the upstream fix in the wpcs that will be released in 3.1.0 (don't know when this will happen tbh).

Then you can release new libs version with this beta CS version so that you're not blocked on PHP8+.

Oh, and also you can pass this to the management:
https://opencollective.com/thewpcc/contribute/wp-php-63406

😁

This will be bumped to 3.1.0 once the fix of the upstream sniff is merged.
Remove autoload dev part from the composer.json - conflicted with phpstan,
and didn't do anything else for the standard.
Raised the minimum WP version to 6.0, replaced outdated and deprecated sniffs.
Still need to test this out. Also the sniff throws errors due to an upstream bug, this needs to be addressed first.
The inside of a 'bad' static method won't get checked, because we only stop at the method name. What is inside is not important if the method itself is not safe.
PHP8 compabitbility
@dingo-d dingo-d marked this pull request as ready for review September 18, 2023 13:30
@dingo-d
Copy link
Contributor Author

dingo-d commented Sep 18, 2023

@iruzevic @iobrado @goranalkovic-infinum @dadadavorin @piqusy @vedranpetrac @kancijan Any feedback about my beta proposal is welcomed 😄

Also, feel free to review the code 🙂

(Can't tag the team because I'm not in the org anymore 😅)

@goranalkovic-infinum goranalkovic-infinum merged commit 57719e1 into infinum:main Sep 22, 2023
16 of 21 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.

None yet

3 participants