You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like ProcessUtils::escapeArgument is too strict and cannot convert an input file into an absolute path, resulting into a Fatal Error when using phpcsfixer task.
# Generate empty folder
mkdir tmp
cd tmp
git init
echo"vendor"> .gitignore
pbpaste > grumphp.yml
composer require phpro/grumphp 0.15.0
composer require friendsofphp/php-cs-fixer
echo"<?php /** This is a sample PHP File */"> sample.php
# Run GrumpHP:
./vendor/bin/grumphp run
Result:
GrumPHP is sniffing your code!
Running task 1/1: PhpCsFixer... PHP Fatal error: Uncaught TypeError: Argument 1 passed to GrumPHP\Process\ProcessUtils::escapeArgument() must be of the type string, object given, called in /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessFactory.php on line 20 and defined in /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessUtils.php:31
Stack trace:
#0 /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessFactory.php(20): GrumPHP\Process\ProcessUtils::escapeArgument(Object(Symfony\Component\Finder\SplFileInfo))
#1 [internal function]: GrumPHP\Process\ProcessFactory::GrumPHP\Process\{closure}(Object(Symfony\Component\Finder\SplFileInfo))
#2 /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessFactory.php(21): array_map(Object(Closure), Array)
#3 /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessBuilder.php(40): GrumPHP\Process\ProcessFactory::fromArguments(Object(GrumPHP\Collection\ProcessArgumentsCollection))
#4 /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Task/AbstractPhpCsFixe in /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessUtils.php on line 31
Fatal error: Uncaught TypeError: Argument 1 passed to GrumPHP\Process\ProcessUtils::escapeArgument() must be of the type string, object given, called in /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessFactory.php on line 20 and defined in /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessUtils.php:31
Stack trace:
#0 /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessFactory.php(20): GrumPHP\Process\ProcessUtils::escapeArgument(Object(Symfony\Component\Finder\SplFileInfo))
#1 [internal function]: GrumPHP\Process\ProcessFactory::GrumPHP\Process\{closure}(Object(Symfony\Component\Finder\SplFileInfo))
#2 /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessFactory.php(21): array_map(Object(Closure), Array)
#3 /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessBuilder.php(40): GrumPHP\Process\ProcessFactory::fromArguments(Object(GrumPHP\Collection\ProcessArgumentsCollection))
#4 /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Task/AbstractPhpCsFixe in /var/www/_tmp/grumphp/tmp/vendor/phpro/grumphp/src/Process/ProcessUtils.php on line 31
The text was updated successfully, but these errors were encountered:
veewee
added a commit
to veewee/grumphp
that referenced
this issue
Mar 7, 2019
0.15.0
Seems like
ProcessUtils::escapeArgument
is too strict and cannot convert an input file into an absolute path, resulting into a Fatal Error when using phpcsfixer task.My configuration
Steps to reproduce:
Result:
The text was updated successfully, but these errors were encountered: