phpro / grumphp

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

[BUG?] Return empty trace for phpstan task #1004

Closed soulcodex closed 1 year ago

soulcodex commented 2 years ago
Q A
Version GrumPHP 1.5.0
Bug? yes
New feature? no
Question? no
Documentation? no
Related tickets N/A

My configuration

# grumphp.yml
grumphp:
  hooks_dir: ~
  process_timeout: 300
  ascii: ~
  fixer:
    enabled: true
    fix_by_default: true
  tasks:
    git_blacklist:
      match_word: true
      keywords:
        - 'dd('
        - 'die('
        - 'var_dump('
        - 'exit;'
        - 'exit('
        - 'dump('
    git_commit_message:
      enforce_capitalized_subject: true
      enforce_no_subject_punctuations: false
      enforce_no_subject_trailing_period: true
      enforce_single_lined_subject: true
      max_subject_width: 60
      max_body_width: 72
    git_branch_name:
      whitelist:
        - '/^(feature|bugfix|refactor|test|update)\/\d+-.+/'
      blacklist:
        - 'release'
        - 'develop'
        - 'master'
        - 'main'
      allow_detached_head: true
    phpcsfixer2:
      config: ./.php-cs-fixer.dist.php
      verbose: true
    phpstan:
      configuration: ./phpstan.neon.dist
      level: max

Steps to reproduce:

./vendor/bin/grumphp run

Result:

MicrosoftTeams-image

The phpstan trace is empty and mark the task as failed.

veewee commented 2 years ago

That sure looks like an issue. Can you run grumphp with -vvv to see the phpstan command which is executed? Can you run that command separately and see if there any issues there?

soulcodex commented 2 years ago

Hi good morning @veewee

I have been run the grumphp command with the verbose option (-vvv) and all is allright about the executed commands, but returns the error on phpstan with a blank trace and no explanation about the error. Then i exec the phpstan command from their binary (./vendor/bin/phpstan) and the result is green [OK] No errors

Thanks a lot for the help :heart:

veewee commented 1 year ago

Is this still an issue @soulcodex. If so, would it be possible to provide a repository that produces the isolated issue without the other tasks?

soulcodex commented 1 year ago

Let me try to reproduce the problem in a isolated environment @veewee

veewee commented 1 year ago

Closing this one because of inactivity If the issue still persists - feel free to reopen and provide some additional context.