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

Symfony 5: rsa key pair generation fails #26

Open
rusanter opened this issue Aug 11, 2020 · 0 comments
Open

Symfony 5: rsa key pair generation fails #26

rusanter opened this issue Aug 11, 2020 · 0 comments

Comments

@rusanter
Copy link

Got an error in Symfony 5.1 app when running vendor/bin/companienv.

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Symfony\Component\Process\Process::__construct() must be of the type array, string given, called in /home/user/sf5/vendor/sroze/companienv/src/Companienv/Extension/RsaKeys.php on line 48 and defined in /home/user/sf5/vendor/symfony/process/Process.php:140
Stack trace:
#0 /home/user/sf5/vendor/sroze/companienv/src/Companienv/Extension/RsaKeys.php(48): Symfony\Component\Process\Process->__construct()
#1 /home/user/sf5/vendor/sroze/companienv/src/Companienv/Extension/Chained.php(31): Companienv\Extension\RsaKeys->getVariableValue()
#2 /home/user/sf5/vendor/sroze/companienv/src/Companienv/Companion.php(79): Companienv\Extension\Chained->getVariableValue()
#3 /home/user/sf5/vendor/sroze/companienv/src/Companienv/Companion.php(53): Companienv\Companion->fillBlockGaps()
#4 /home/user/sf5/vendor/sroze/companienv/src/Companienv/Application.php(66): Companienv\Companion->fillGaps()
#5 /home/user/sf5/ in /home/user/sf5/vendor/symfony/process/Process.php on line 140

composer.json

"symfony/process": "5.1.*",
"sroze/companienv": "^1.0",

I have the following in my dist file

###> lexik/jwt-authentication-bundle ###
#+rsa-pair(JWT_SECRET_KEY JWT_PUBLIC_KEY JWT_PASSPHRASE)
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
JWT_PASSPHRASE=secret
###< lexik/jwt-authentication-bundle ###

This is because of the breaking change in the Symfony 5 Process component https://github.com/symfony/symfony/blob/master/UPGRADE-5.0.md#process

Commands must be defined as arrays when creating a Process instance.

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