phpro / grumphp

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

`stop_on_failure: true` and `blocking: false` don't work as expected #860

Closed dshafik closed 3 years ago

dshafik commented 3 years ago
Q A
Version 1.3.0
Bug? yes
New feature? no
Question? no
Documentation? no?
Related tickets

If stop_on_failure is set to true, and a task has blocking set to false, GrumPHP will still stop execution rather than ignoring the failure as is done when stop_one_failure: false.

My configuration

grumphp:
    stop_on_failure: true
    tasks:
        phpstan:
            metadata:
                blocking: false
            use_grumphp_paths: false
            configuration: phpstan.neon.dist

Steps to reproduce:

Call ./vendor/bin/grumphp run with one task that will fail set to blocking: false (e.g. set process_timeout: 1 and put a sleep(2) in a phpunit test.

Result:

image

As you can see, phpstan has an orange x indicating it failed but should be ignored, and then GrumPHP Aborted…

veewee commented 3 years ago

Thanks for reporting. Provided a PR that fixes this issue in #862.