Level in configuration file is not taken into account
CaptainQuirk opened this issue · 2 comments
CaptainQuirk commented
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 ?
ondrejmirtes commented
PHPStan 0.9.2 is really old, the newest one is 0.11.19. You probably aren’t
running PHP 7.1 or newer so Composer chooses this ancient PHPStan version
for you.
On Fri, 25 Oct 2019 at 17:38, Léonard Messier ***@***.***> wrote:
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 could do wrong ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#34?email_source=notifications&email_token=AAAZTOCNW6DSG3YVWVUI3SLQQMHHFA5CNFSM4JFE5NW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HUNNXKQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZTOBTLXJQLFFDSK7FQITQQMHHFANCNFSM4JFE5NWQ>
.
--
Ondřej Mirtes
CaptainQuirk commented
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 !