phpstan-bodyscan icon indicating copy to clipboard operation
phpstan-bodyscan copied to clipboard

Take phpstan.neon.dist into consideration

Open phh opened this issue 1 year ago • 2 comments
trafficstars

Right now it looks like it's only taking phpstan.neon into consideration when reusing the configuration. It is possible if it could look at phpstan.neon first, and then phpstan.neon.dist if it does not exist? Perhaps also considering the phpstan.dist.neon as well.

https://phpstan.org/config-reference#config-file

If you do not provide a config file explicitly, PHPStan will look for files named phpstan.neon, phpstan.neon.dist, or phpstan.dist.neon in the current directory.

...

The usual practice is to have phpstan.neon.dist or phpstan.dist.neon under version control, and allow the user to override certain settings in their environment (on their own computer or on a continuous integration server) by creating phpstan.neon that’s present in .gitignore file. See Multiple files for more details:

phh avatar May 22 '24 06:05 phh

Sounds legit :+1: Would you like to contribute this?

TomasVotruba avatar May 22 '24 07:05 TomasVotruba

Would give it a try :)

phh avatar May 22 '24 21:05 phh

Found bit time to fix this in the meantime :) https://github.com/TomasVotruba/phpstan-bodyscan/pull/24

TomasVotruba avatar May 29 '24 08:05 TomasVotruba