-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed as not planned
Closed as not planned
Copy link
Description
Symfony version(s) affected
7.1
Description
Upgrading symfony/process
from 7.0.8
to 7.1.1
breaks commiting with phpro/grumphp:^2.0
.
$ git commit -m 'wip'
Fatal error: Uncaught Symfony\Component\Process\Exception\ProcessStartFailedException: The command "'git' 'rev-parse' '--show-toplevel'" failed.
Working directory: /app
Error: proc_open(): posix_spawn() failed: No such file or directory in /app/vendor/symfony/process/Process.php:371
Stack trace:
#0 /app/vendor/symfony/process/Process.php(249): Symfony\Component\Process\Process->start(NULL, Array)
#1 /app/vendor/phpro/grumphp/src/Locator/GitWorkingDirLocator.php(31): Symfony\Component\Process\Process->run()
#2 /app/vendor/phpro/grumphp/src/Locator/GuessedPathsLocator.php(158): GrumPHP\Locator\GitWorkingDirLocator->locate()
#3 /app/vendor/phpro/grumphp/src/Locator/GuessedPathsLocator.php(50): GrumPHP\Locator\GuessedPathsLocator->safelyLocateGitWorkingDir('/app')
#4 /app/vendor/phpro/grumphp/src/Configuration/ContainerFactory.php(57): GrumPHP\Locator\GuessedPathsLocator->locate(NULL)
#5 /app/vendor/phpro/grumphp/src/Configuration/ContainerFactory.php(25): GrumPHP\Configuration\ContainerFactory::guessPaths(NULL)
#6 /app/vendor/phpro/grumphp/bin/grumphp(44): GrumPHP\Configuration\ContainerFactory::build(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /app/vendor/phpro/grumphp/bin/grumphp(51): {closure}()
#8 /app/vendor/bin/grumphp(119): include('/app/vendor/php...')
#9 {main}
thrown in /app/vendor/symfony/process/Process.php on line 371
How to reproduce
- Having dependencies
phpro/grumphp:^2.0
(dev) andsymfony/process:7.1.*
- Running in docker with PHP-FPM
8.3.8
.
Example grumphp config
grumphp.yml
grumphp:
process_timeout: 90
git_hook_variables:
EXEC_GRUMPHP_COMMAND: 'docker compose run -T --rm --no-deps phpfpm'
tasks:
phpcsfixer:
config: '.php-cs-fixer.dist.php'
Possible Solution
Using 7.0.8
until fixed.
Additional Context
Possibly related to #52409
Reproduction example
grantholle