Skip to content

GrumPHP's phpstan task doesn't get paths to analyse #1179

@BigElmo

Description

@BigElmo

Good day!
I have a Yii2 PHP: v8.0.30 project with the configs below. Since the last project reinstall, GrumPHP is not provide paths to phpstan no more. Before reinstall it worked correctly.
composer.json

"require-dev": {
"phpstan/phpstan": "^1.6",
"phpro/grumphp": "^1.12"
},

grumphp.yml

tasks:
phpstan:
configuration: "phpstan.neon"
triggered_by: ["php"]
memory_limit: "-1"
use_grumphp_paths: true

phpstan.neon

includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon

parameters:
tmpDir: runtime/
bootstrapFiles:
- vendor/yiisoft/yii2/Yii.php
- vendor/autoload.php
- defines.php
level: 8
ignoreErrors
- '#Some errors here#'
scanDirectories:
- Some dirs here
excludePaths:
- some paths here

After "composer install" I get PHPStan: v1.12.28 and GrumPHP: v1.13.0.
When I make some changes at SomeClass.php (that not in excludePaths), and then "git commit", I get the following error:

Running task 2/5: phpstan... ✘
phpstan

Note: Using configuration file C:\OSPanel629\home\myproject\phpstan.neon.
At least one path must be specified to analyse.

What am I doing wrong? Isn't the GrumPHP have to pass changed files to phpstan task as a path param?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions