phpro / grumphp

A PHP code-quality tool
MIT License
4.15k stars 431 forks source link

PhpCsFixerFormatter - escapeArgument #446

Closed adlarge closed 6 years ago

adlarge commented 6 years ago
Q A
Version 0.13.0
Bug? yes
New feature? no
Question? no
Documentation? no
Related tickets

My configuration

parameters:
    git_dir: .
    bin_dir: vendor/bin
    tasks:
        phplint: ~
        phpcsfixer: ~
    ascii:
        failed: ~
        succeeded: ~

Steps to reproduce:

# Generate empty folder
mkdir tmp
cd tmp
git init
echo "vendor" > .gitignore
pbpaste > grumphp.yml
composer require --dev phpro/grumphp

# Your actions
# Please add the steps on how to reproduce the issue here.

# Run GrumpHP:
git add -A && git commit -m"Test"
# or
./vendor/bin/grumphp run

Result:

Running task 1/2: PhpCsFixer... PHP Fatal error:  Uncaught Error: Call to undefined method Symfony\Component\Process\ProcessUtils::escapeArgument() in /vendor/phpro/grumphp/src/Formatter/PhpCsFixerFormatter.php:51

If i have a psr error in a php file this error occures when commiting. I think this is a namespace issue. It should use the class in grumphp/src/Process instead of the symfony one.

veewee commented 6 years ago

Hi @arnaud-large,

Thanks for noticing. This one will be fixed in #443.