composer installでエラー
コンソールエラー
PHP Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php:84
解決法
下記を実行して、composerのバージョンをアップグレードする。
composer self-update --1
参考にしたサイト
エラー全文
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/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 112
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/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 112
Deprecation Notice: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:48
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Repository/ArrayRepository.php:206
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Repository/ArrayRepository.php:206
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Repository/ArrayRepository.php:206
Deprecation Notice: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:48
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Repository/ArrayRepository.php:206
Deprecation Notice: Return type of Composer\Repository\CompositeRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Repository/CompositeRepository.php:139
Loading composer repositories with package information
Deprecation Notice: Return type of Composer\DependencyResolver\Pool::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Pool.php:175
Installing dependencies (including require-dev) from lock file
Deprecation Notice: Return type of Composer\DependencyResolver\RuleSet::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/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/RuleSet.php:114
Deprecation Notice: Return type of Composer\DependencyResolver\RuleSet::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/RuleSet.php:99
Deprecation Notice: Return type of Composer\DependencyResolver\Decisions::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Decisions.php:155
Deprecation Notice: Return type of Composer\DependencyResolver\Decisions::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Decisions.php:165
Deprecation Notice: Return type of Composer\DependencyResolver\Decisions::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Decisions.php:160
Deprecation Notice: Return type of Composer\DependencyResolver\Decisions::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Decisions.php:170
Deprecation Notice: Return type of Composer\DependencyResolver\Decisions::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Decisions.php:150
Deprecation Notice: Return type of Composer\DependencyResolver\Decisions::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Decisions.php:145
Deprecation Notice: Return type of Composer\DependencyResolver\RuleSetIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/RuleSetIterator.php:36
Deprecation Notice: Return type of Composer\DependencyResolver\RuleSetIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/RuleSetIterator.php:46
Deprecation Notice: Return type of Composer\DependencyResolver\RuleSetIterator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/RuleSetIterator.php:41
Deprecation Notice: Return type of Composer\DependencyResolver\RuleSetIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/RuleSetIterator.php:89
Deprecation Notice: Return type of Composer\DependencyResolver\RuleSetIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/RuleSetIterator.php:70
PHP Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php:84
Stack trace:
#0 [internal function]: array_merge(brick/math: Array)
#1 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php(84): call_user_func_array('array_merge', Array)
#2 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Solver.php(387): Composer\DependencyResolver\DefaultPolicy->selectPreferredPackages(Object(Composer\DependencyResolver\Pool), Array, Array, 'brick/math')
#3 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Solver.php(740): Composer\DependencyResolver\Solver->selectAndInstall(1, Array, Array, Object(Composer\DependencyResolver\GenericRule))
#4 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Solver.php(231): Composer\DependencyResolver\Solver->runSat(Array)
#5 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Installer.php(489): Composer\DependencyResolver\Solver->solve(Object(Composer\DependencyResolver\Request), false)
#6 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Installer.php(232): Composer\Installer->doInstall(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Repository\CompositeRepository), Object(Composer\Repository\PlatformRepository), Array)
#7 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Command/InstallCommand.php(122): Composer\Installer->run()
#8 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\InstallCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand(Object(Composer\Command\InstallCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Console/Application.php(281): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Application.php(117): Composer\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Console/Application.php(113): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/bin/composer(61): Composer\Console\Application->run()
#15 /usr/local/Cellar/composer/1.10.9/bin/composer(24): require('phar:///usr/loc...')
#16 {main}
thrown in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php on line 84
Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php:84
Stack trace:
#0 [internal function]: array_merge(brick/math: Array)
#1 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php(84): call_user_func_array('array_merge', Array)
#2 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Solver.php(387): Composer\DependencyResolver\DefaultPolicy->selectPreferredPackages(Object(Composer\DependencyResolver\Pool), Array, Array, 'brick/math')
#3 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Solver.php(740): Composer\DependencyResolver\Solver->selectAndInstall(1, Array, Array, Object(Composer\DependencyResolver\GenericRule))
#4 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/Solver.php(231): Composer\DependencyResolver\Solver->runSat(Array)
#5 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Installer.php(489): Composer\DependencyResolver\Solver->solve(Object(Composer\DependencyResolver\Request), false)
#6 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Installer.php(232): Composer\Installer->doInstall(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Repository\CompositeRepository), Object(Composer\Repository\PlatformRepository), Array)
#7 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Command/InstallCommand.php(122): Composer\Installer->run()
#8 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\InstallCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand(Object(Composer\Command\InstallCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Console/Application.php(281): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Application.php(117): Composer\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Console/Application.php(113): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 phar:///usr/local/Cellar/composer/1.10.9/bin/composer/bin/composer(61): Composer\Console\Application->run()
#15 /usr/local/Cellar/composer/1.10.9/bin/composer(24): require('phar:///usr/loc...')
#16 {main}
thrown in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php on line 84
composer self-update --1
実行時ログ
$ composer self-update --1
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/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 112
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/Cellar/composer/1.10.9/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 112
Deprecation Notice: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:48
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Repository/ArrayRepository.php:206
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Repository/ArrayRepository.php:206
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Repository/ArrayRepository.php:206
Deprecation Notice: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:48
Warning: You forced the install of 1.10.26 via --1, but 2.4.4 is the latest stable version. Updating to it via composer self-update --stable is recommended.
Updating to version 1.10.26 (1 channel).
Downloading (100%)
Deprecation Notice: Function openssl_free_key() is deprecated in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Command/SelfUpdateCommand.php:246
Use composer self-update --rollback to return to version 1.10.9
composer install 実行時のログ
$ composer install
You are using Composer 1 which is deprecated. You should upgrade to Composer 2, see https://blog.packagist.com/deprecating-composer-1-support/
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 1 install, 0 updates, 0 removals
- Installing laravel/ui (v4.1.0): Downloading (100%)
Generating optimized autoload files
Deprecation Notice: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in phar:///usr/local/Cellar/composer/1.10.9/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:257
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
INFO Discovering packages.
laravel/sail .......................................................... DONE
laravel/sanctum ....................................................... DONE
laravel/tinker ........................................................ DONE
laravel/ui ............................................................ DONE
nesbot/carbon ......................................................... DONE
nunomaduro/collision .................................................. DONE
nunomaduro/termwind ................................................... DONE
spatie/laravel-ignition ............................................... DONE
81 packages you are using are looking for funding.
Use the `composer fund` command to find out more!