Closed adrenth closed 1 year ago
You're probably registering your rules manually, putting them like this into your .neon, right?
rules:
- PHPStan\Rules\Operators\OperandsInArithmeticAdditionRule
There's a better way. You need to include vendor/phpstan/phpstan-strict-rules/rules.neon
from this repository and then use the configuration like this to enable/disable specific rules: https://github.com/phpstan/phpstan-strict-rules#disabling-rules
I assume that includes/phpstan-strict-rules.neon
wasn't written by us and that's why it's outdated...
@ondrejmirtes I think you're right! We have included several .neon files in a separate package which we include. I will check if these files are up to date.
You should always use the official ones, copying and pasting parts of the file is no longer encouraged.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
After upgrading to v1.5.0 this error occurs when performing a
phpstan analyze
on my code:Introduced in commit: https://github.com/phpstan/phpstan-strict-rules/commit/b7dd96a5503919a43b3cd06a2dced9d4252492f2
Line number: https://github.com/phpstan/phpstan-strict-rules/blame/b7dd96a5503919a43b3cd06a2dced9d4252492f2/src/Rules/Operators/OperandsInArithmeticAdditionRule.php#L24
Do I miss a new setting parameter in my configuration?
Contents of my
/var/www/html/phpstan.neon.dist
file:Contents of my
./[path-to-my-default-rules]/rules.neon
file: