Running valet install using version 2.2.3 produces an error:
```valet install
Stopping nginx...
Fatal error: Uncaught Error: Call to undefined method Symfony\Component\Process\Process::fromShellCommandline() in /Users/alex/.composer/vendor/laravel/valet/cli/Valet/CommandLine.php:77
Stack trace:
```
Installing Laravel Valet 2.2.2 with Composer instead fixes this problem.
Ah—we just made that change in order to stop relying on a deprecated method and we may have to introduce a stricter requirement on the Symfony dependency. For now, can you run ‘composer global update’ and see if it helps at all? I’ll try to test this out a bit later.
Ah—we just made that change in order to stop relying on a deprecated method and we may have to introduce a stricter requirement on the Symfony dependency. For now, can you run ‘composer global update’ and see if it helps at all? I’ll try to test this out a bit later.
I have tried this and still have the same message.
My gut is to revert that change, since it's just deprecated for now, and then resolve the issue where we're allowing older versions of Symfony's process component and how to update the deprecation there.
@alexmck @Artnforces do you mind testing the following to help us determine the most effective "fix" for this?
Tell us what's in your global composer.json: cat ~/.composer/composer.json
What's your PHP version? and MacOS version?
Force-delete old versions of global packages, and re-install latest:
rm -rf ~/.composer/vendor ~/.composer/composer.lock
composer global update
After running this, do the symptoms persist?
rm -rf ~/.composer/vendor ~/.composer/composer.lock
global composer.json:
{
"require": {
"laravel/installer": "^1.3",
"laravel/valet": "^2.2"
}
}
PHP Version :
PHP 7.3.1 (cli) (built: Feb 1 2019 12:26:46) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
MacOs version
OS El Capitan 10.11.6
Nothing has change under the sky! :-(
Fatal error: Uncaught Error: Call to undefined method Symfony\Component\Process\Process::fromShellCommandline() in /Users/simpleFX/.composer/vendor/laravel/valet/cli/Valet/CommandLine.php on line 77
Error: Call to undefined method Symfony\Component\Process\Process::fromShellCommandline() in /Users/simpleFX/.composer/vendor/laravel/valet/cli/Valet/CommandLine.php on line 77
Call Stack:
0.0007 417520 1. {main}() /Users/simpleFX/.composer/vendor/laravel/valet/cli/valet.php:0
0.0203 2207584 2. Symfony\Component\Console\Application->run() /Users/simpleFX/.composer/vendor/laravel/valet/cli/valet.php:304
0.0324 2468640 3. Symfony\Component\Console\Application->doRun() /Users/simpleFX/.composer/vendor/symfony/console/Application.php:148
0.0330 2471936 4. Symfony\Component\Console\Application->doRunCommand() /Users/simpleFX/.composer/vendor/symfony/console/Application.php:255
0.0330 2471936 5. Symfony\Component\Console\Command\Command->run() /Users/simpleFX/.composer/vendor/symfony/console/Application.php:960
0.0332 2473432 6. Silly\Application->Silly\{closure}() /Users/simpleFX/.composer/vendor/symfony/console/Command/Command.php:253
0.0343 2632288 7. Invoker\Invoker->call() /Users/simpleFX/.composer/vendor/mnapoli/silly/src/Application.php:95
0.0344 2632536 8. call_user_func_array:{/Users/simpleFX/.composer/vendor/php-di/invoker/src/Invoker.php:82}() /Users/simpleFX/.composer/vendor/php-di/invoker/src/Invoker.php:82
0.0344 2632600 9. Silly\Application->{closure:/Users/simpleFX/.composer/vendor/laravel/valet/cli/valet.php:48-59}() /Users/simpleFX/.composer/vendor/php-di/invoker/src/Invoker.php:82
0.0344 2632600 10. Facade::stop() /Users/simpleFX/.composer/vendor/laravel/valet/cli/valet.php:49
0.0344 2632656 11. Facade::__callStatic() /Users/simpleFX/.composer/vendor/laravel/valet/cli/valet.php:49
0.0368 2805840 12. Valet\Nginx->stop() /Users/simpleFX/.composer/vendor/laravel/valet/cli/includes/facades.php:28
0.0372 2805840 13. Valet\Brew->nginxServiceName() /Users/simpleFX/.composer/vendor/laravel/valet/cli/Valet/Nginx.php:159
0.0372 2805840 14. Valet\Brew->installed() /Users/simpleFX/.composer/vendor/laravel/valet/cli/Valet/Brew.php:91
0.0372 2805896 15. Valet\CommandLine->runAsUser() /Users/simpleFX/.composer/vendor/laravel/valet/cli/Valet/Brew.php:48
0.0372 2805976 16. Valet\CommandLine->runCommand() /Users/simpleFX/.composer/vendor/laravel/valet/cli/Valet/CommandLine.php:63
This is what happened when running composer global update :
`Updating dependencies (including require-dev)
Package operations: 23 installs, 0 updates, 0 removals
But ..still have the error.
"laravel/installer": "^1.3",
That might be your issue.
Try running this to update it to newer:
composer global require laravel/installer
(or manually change it from ^1.3 to >1.3 and run composer global update)
Anyone getting this issue, you have some out of date global Composer dependencies, which you should review and update.
However, we've also reverted this change in https://github.com/laravel/valet/releases/tag/v2.2.4 and will come up with a solution that doens't force everyone to upgrade immediately.
Anyone who saw this problem earlier, would you mind testing this PR out if you know how to test PRs?
Most helpful comment
@alexmck @Artnforces do you mind testing the following to help us determine the most effective "fix" for this?
Tell us what's in your global composer.json:
cat ~/.composer/composer.jsonWhat's your PHP version? and MacOS version?
Force-delete old versions of global packages, and re-install latest:
After running this, do the symptoms persist?