phpstan/phpstan-shim

rootDir is not working in exclusion_analyse

meridius opened this issue · 1 comments

The file (directory) exclusion by excludes_analyse is not working in PHAR-ed version of PHPStan (0.7).
The files in excluded directories are still scanned and reported.

While this works fine in normal version (0.7) because PHPStan resides in <project>/vendor/phpstan/phpstan/bin/phpstan:

parameters:
    excludes_analyse:
        - %rootDir%/../../../src/Component/Foo/tests/*

Than I'd expect that %rootDir%/../src/Component/Foo/tests/* would work for PHAR-ed version because it resides in <project>/bin/phpstan.phar (because of my config.bin-dir in composer.json).

Never mind. The proper number of ../ is 4 for some reason.

- %rootDir%/../../../../src/Component/Foo/tests/*