composer installをやった際に、以下のエラーがでました。
PHP 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 phar:///usr/local/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 113
PHP Stack trace:
PHP 1. {main}() /usr/local/bin/composer:0
PHP 2. require() /usr/local/bin/composer:24
PHP 3. Composer\Console\Application->__construct() phar:///usr/local/bin/composer/bin/composer:42
PHP 4. Symfony\Component\Console\Application->__construct($name = 'Composer', $version = '1.0.0') phar:///usr/local/bin/composer/src/Composer/Console/Application.php:85
PHP 5. Symfony\Component\Console\Application->getDefaultHelperSet() phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:87
PHP 6. Composer\Autoload\ClassLoader->loadClass($class = 'Symfony\\Component\\Console\\Helper\\HelperSet') phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:931
PHP 7. Composer\Autoload\includeFile($file = 'phar:///usr/local/bin/composer/vendor/symfony/console/Helper/HelperSet.php') phar:///usr/local/bin/composer/vendor/composer/ClassLoader.php:301
PHP 8. include() phar:///usr/local/bin/composer/vendor/composer/ClassLoader.php:412
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 phar:///usr/local/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 113
エラーだけをみるとなんのエラーかわからないですが、しらべてみると、composerのバージョンが低いから出たエラーだそうです。
従いまして、composerをアップデートして再実行したら、なおりました。
composer self-update