phpstan-banned-code
phpstan-banned-code copied to clipboard
Advanced configuration doesn't work
It seems advanced configuration is not easy to get going. According to PHPstan docs you shouldn't use extension installer when not wanting all rules of an extension. I tried both with and without.
What I think is happening is that the list of banned nodes from the extension config is merged with the list specified in my project config. (Similar to how ignoreErrors is merged from the baseline file and project config).
This means that removing an item because I don't care about echo usage is not possible.
A workaround is to ignore the specific error manually, but doesn't feel very clean.