ITの隊長のブログ

ITの隊長のブログです。Pythonを使って仕事しています。最近はWebに戻ってきたお(^ω^ = ^ω^)

composerが動かない

スポンサードリンク

$ /usr/local/bin/composer
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 119

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 119
PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriResolver.php on line 112

Fatal error: Array and string offset access syntax with curly braces is no longer supported in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriResolver.php on line 112

why??? エラー文読んでみると、とりあえずPHPが新しくてcomposerが古そうな感じ。だけど対処方法はわからない。

ぐぐってもわからないのでとりあえず更新してみる。

$ brew reinstall composer

$ composer --version
Composer version 2.3.8 2022-07-01 12:10:47

おk