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

SlevomatCodingStandard.ControlStructures.YodaComparison is removed #46

Closed
oojacoboo opened this issue Jun 24, 2018 · 4 comments
Closed

Comments

@oojacoboo
Copy link

oojacoboo commented Jun 24, 2018

The ruleset SlevomatCodingStandard.ControlStructures.YodaComparison has been removed. Please update the ruleset as this breaks phpcs, at least within the vscode plugin currently.

It appears this sniff has been updated to DisallowYodaComparisonSniff.

@VasekPurchart
Copy link
Member

VasekPurchart commented Jun 25, 2018

Yes, this was already addressed long time ago: 2bafec2.

But I am not sure if your phpcs setup is correct, since as you can see, due to the version constraints you should have never been able to install Slevomat CS 4.0 alongside an incompatible version of Consistence CS.

@oojacoboo
Copy link
Author

I have the following in my composer.json

"slevomat/coding-standard": "~4.6",
"consistence/coding-standard": "~3.4",

@VasekPurchart
Copy link
Member

That is pretty weird, are you sure, there is no other CS ruleset, where an old version of Yoda sniff might be included? Can you verify that the Consistence's ruleset contains the changed rule on your disk? (should be at vendor/consistence/coding-standard/Consistence/ruleset.xml).

And how do you run your phpcs (which cmd args)?

@oojacoboo
Copy link
Author

Looks like the issue was within some other repos within my IDE project. So, after composer updating each repo, the ruleset disappeared. Sorry for the false alarm.

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

No branches or pull requests

2 participants