Ad

Laravel 9 - Laravel New Command Has Error: Deprecated: Return Type Of Symfony\Component\Process\Process::getIterator(int $flags = 0)

- 1 answer

I want to try to install Laravel 9 for the first time... so, I update my PHP to the latest one (version 8.1.2) and composer to latest one also (version 2.2.6)...

and when i call laravel new my-project command, it shows error

Deprecated: Return type of Symfony\Component\Process\Process::getIterator(int $flags = 0) should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\LAPTOP-SYAMSOUL\AppData\Roaming\Composer\vendor\symfony\process\Process.php on line 620

Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\LAPTOP-SYAMSOUL\AppData\Roaming\Composer\vendor\symfony\console\Helper\HelperSet.php on line 94

how to solve this error?

Ad

Answer

Sounds like you should run composer global update to update the packages that you've installed globally.

Ad
source: stackoverflow.com
Ad