$ Build/bin/ecs check Classes Configuration Tests --fix
PHP Notice: Sniff "Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff" is deprecated. Use "https://github.com/symplify/coding-standard/blob/master/packages/cognitive-complexity/src/Rules/FunctionLikeCognitiveComplexityRule.php"
....
I have following in my config which is deprecated:
services:
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
maxCognitiveComplexity: 20
But the link above in the use suggestion:
https://github.com/symplify/coding-standard/blob/master/packages/cognitive-complexity/src/Rules/FunctionLikeCognitiveComplexityRule.php#L26
Links to a blog post, saying using it like I already do.
Think something needs to be adjusted for a proper suggestion.
Good point, updating is one of points on my checklist for this week.
But from your feedback I see it must be done today to prevent confusion.
Thanks :+1:
Don't stress too much. Just happy that I can "help" you a little as well. So that it's not only a one-way street.
If you want to take it further, the PR is the biggest help ;)
(not for this one though, I'm already working on it)
I didn't know what to replace it with, otherwise I would have done the PR too.
Ah, I thought it's clear from the post: https://www.tomasvotruba.com/blog/2020/05/04/how-to-upgrade-to-symplify-8-from-sniffs-to-phpstan-rules/
What can be improved there to make it more clear?
https://github.com/symplify/coding-standard/blob/master/packages/cognitive-complexity/src/Rules/FunctionLikeCognitiveComplexityRule.php#L26 links to:
https://www.tomasvotruba.com/blog/2018/05/21/is-your-code-readable-by-humans-cognitive-complexity-tells-you/
Your link is to:
https://www.tomasvotruba.com/blog/2020/05/04/how-to-upgrade-to-symplify-8-from-sniffs-to-phpstan-rules/
That is two different blog posts. The second one makes it more clear :)
I know :) I've updated the 2018 old one just now.
And wrote the 2020 today like 8 hours ago, so people can migrate easily.