phpro / grumphp

A PHP code-quality tool
MIT License
4.14k stars 430 forks source link

phpstan `configuration` param not working #777

Closed burzum closed 4 years ago

burzum commented 4 years ago
Q A
Version 0.19.1
Bug? yes
New feature? no
Question? no
Documentation? no
Related tickets comma-separated list of related tickets

My configuration

# grumphp.yml
grumphp:
    hooks_dir: ~
    hooks_preset: local
    stop_on_failure: true
    ignore_unstaged_changes: true
    parallel:
        enabled: false
        max_workers: 32
    tasks:
        phpstan:
            configuration: ./phpstan.neon
        phpcs:
            whitelist_patterns:
                - /^src\/(.*)/
                - /^tests\/(.*)/

Steps to reproduce:

Use the above config and simply run it:

Edit: I figured out this happens only when xdebug is on. However, phpstan is never using my config file when running it through grumphp.

.\bin\grumphp.bat run

According to the docs this should be correct? I'm using phpstan 0.12.29.

https://github.com/phpro/grumphp/blob/master/doc/tasks/phpstan.md

Result:

_HumbugBox89320708a2e3\Symfony\Component\Console\Exception\RuntimeException: The "--configuration" option does not exist. in phar://C:/xampp/htdocs/file-storage/bin/phpstan/vendor/symfony/console/Input/ArgvInput.php on line 180