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

WordPress.PHP.DisallowShortTernary has been removed in upstream development WordPress-Coding-Standards #159

Closed
mrsdizzie opened this issue Jan 31, 2023 · 2 comments

Comments

@mrsdizzie
Copy link
Member

mrsdizzie commented Jan 31, 2023

I had to update to PHP 8 and WordPress-Coding-Standards intentionally doesn't support PHP 8 on their main branch, but only the development branch:

WordPress/WordPress-Coding-Standards#2035 (comment)

Their development branch uses https://github.com/PHPCSStandards/PHPCSExtra as a new dependency

And they have removed WordPress.PHP.DisallowShortTernary in favor of Universal.Operators.DisallowShortTernary here:

WordPress/WordPress-Coding-Standards#1911

So now with this setup WP_CLI_CS returns ERROR: Referenced sniff "WordPress.PHP.DisallowShortTernary" does not exist

<exclude name="WordPress.PHP.DisallowShortTernary"/>

I don't know if there is a fix right now, because there isn't a separate development branch of this sniff that would track WordPress-Coding-Standards but I'll leave it here for the future.

@danielbachhuber
Copy link
Member

Thanks for the report, @mrsdizzie !

@danielbachhuber
Copy link
Member

This will be fixed up with #175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants