Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Process\Process::__construct() must be of the type array, string given, #138

Open
s2925534 opened this issue Jul 2, 2020 · 0 comments

Comments

@s2925534
Copy link

s2925534 commented Jul 2, 2020

While trying to use the pre-push hook and I just do a git push origin I get the following issue

john.doe@C02CF02MLVDM code-standards-addons % git push origin dev-hooks Pre-push hook PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Process\Process::__construct() must be of the type array, string given, called in /Users/pedro/projects/Swissport/code-standards-addons/vendor/bruli/php-git-hooks/src/PhpGitHooks/Module/Git/Infrastructure/Git/PrePushOriginalExecutor.php on line 18 and defined in /Users/pedro/projects/Swissport/code-standards-addons/vendor/symfony/process/Process.php:140 Stack trace: #0 /Users/pedro/projects/Swissport/code-standards-addons/vendor/bruli/php-git-hooks/src/PhpGitHooks/Module/Git/Infrastructure/Git/PrePushOriginalExecutor.php(18): Symfony\Component\Process\Process->__construct('./pre-push-orig...') #1 /Users/pedro/projects/Swissport/code-standards-addons/vendor/bruli/php-git-hooks/src/PhpGitHooks/Module/Git/Contract/Command/PrePushToolHandler.php(120): PhpGitHooks\Module\Git\Infrastructure\Git\PrePushOriginalExecutor->execute('origin', '[email protected]...') #2 /Users/pedro/projects/Swissport/code-standards-addons/vendor/bruli/php-git-hooks/src/PhpGitHooks/ in /Users/pedro/projects/Swissport/code-standards-addons/vendor/symfony/process/Process.php on line 140 `` Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Process\Process::__construct() must be of the type array, string given, called in /Users/pedro/projects/Swissport/code-standards-addons/vendor/bruli/php-git-hooks/src/PhpGitHooks/Module/Git/Infrastructure/Git/PrePushOriginalExecutor.php on line 18 and defined in /Users/pedro/projects/Swissport/code-standards-addons/vendor/symfony/process/Process.php:140 Stack trace: #0 /Users/pedro/projects/Swissport/code-standards-addons/vendor/bruli/php-git-hooks/src/PhpGitHooks/Module/Git/Infrastructure/Git/PrePushOriginalExecutor.php(18): Symfony\Component\Process\Process->__construct('./pre-push-orig...') #1 /Users/pedro/projects/Swissport/code-standards-addons/vendor/bruli/php-git-hooks/src/PhpGitHooks/Module/Git/Contract/Command/PrePushToolHandler.php(120): PhpGitHooks\Module\Git\Infrastructure\Git\PrePushOriginalExecutor->execute('origin', '[email protected]...') #2 /Users/pedro/projects/Swissport/code-standards-addons/vendor/bruli/php-git-hooks/src/PhpGitHooks/ in /Users/pedro/projects/Swissport/code-standards-addons/vendor/symfony/process/Process.php on line 140 error: failed to push some refs to '[email protected]:aerocare-dev/serverless_function_skeleton_bref.git'

The constructor in the Process.php file is set as below:

public function __construct(array $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
If I changed to the below, it just works.
public function __construct( $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant