phpstan/phpstan-shim

Level in configuration file is not taken into account

CaptainQuirk opened this issue · 2 comments

Hi there,

I just installed the 0.9.2 version of phpstan/phpstan-shim.

I'm using the following configuration :

parameters:
		level: 1
		autoload_file: %currentWorkingDirectory%/vendor/autoload.php

I'm launching phpstan itself the following way :

$ vendor/bin/phpstan analyse --configuration module/Feedback/phpstan.neon module/Feedback

I get the following result :

No rules detected

You have the following choices:

* while running the analyse option, use the --level option to adjust your rule level - the higher the stricter

* create your own custom ruleset by selecting which rules you want to check by copying the service definitions from the built-in config level files in phar:///home/leonard/Projects/Mailjet/front/Code/mailjet-zend/vendor/phpstan/phpstan-sh
im/phpstan.phar/conf.
  * in this case, don't forget to define parameter customRulesetUsed in your config file.

If I use the PHPStan Docker image like this :

$ docker run --rm -v "${PWD}":/app phpstan/phpstan analyse --configuration /app/module/Feedback/phpstan.neon /app/module/Feedback

🎉 it works

Any idea on what I'm doing wrong ?

Sorry for the delay ! Upgrading PHP from 7.0 to 7.1 is not an option at this point ! I'm using the command line --level option for the moment ! It's not ideal but that will do !

Thanks !