Closed duboiss closed 3 years ago
To me it does not work at all. Even if I specified level: 8
it does not report any error.
File example:
...
/**
* TravelRepository constructor.
*
* @param Model $model
*/
public function __construct(Travel $model)
{
parent::__construct($model);
}
...
With level: 8
it should report the wrong PHPDoc on * @param Model $model
(because the argument received is Travel $model
) but it doesn't. Running PHPStan manually works fine and reports the error. My conf:
# grumphp.yml
grumphp:
git_hook_variables:
EXEC_GRUMPHP_COMMAND: docker exec my_container_name php
ENV: {}
stop_on_failure: true
ignore_unstaged_changes: false
fixer:
enabled: true
fix_by_default: true
tasks:
phpcsfixer:
allow_risky: true
verbose: true
diff: true
phpstan:
configuration: './phpstan.neon'
memory_limit: '2G'
level: 8
use_grumphp_paths: true
Hello @DuboisS
Tested it out here.
The default configured level inside grumphp is indeed level 0.
I will change it to null
- which falls back to the configured value in phpstan.neon
.
If none of the files provide a level, you will get an understandable error back from phpstan.
@danilopolani
To me it does not work at all.
This doesn't really give me an idea what isn't working for you. I am pretty sure it is not related to the level, since you provided it through the config. Feel free to open up a separate issue with more information so that we can tackle it together!
My configuration
Specifying level 8 in grumphp.yml, it works normally (1, he found one error). But without level in grumphp.yml, keeping the one in phpstan.neon, it takes level 0 (2, no error).
I really think this is a bug, because, for exemple,
excludes_analyse
in phpstan.neon works withoutignore_patterns
in grumphp.yml.So the problem seems to be that the task doesn't take the level into in phpstan.neon.