7
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

composer install とか update でこんなうざいのが出たら...

Last updated at Posted at 2021-03-10

うざうざエラー

% composer install
Deprecation Notice: Required parameter $path follows optional parameter $schema in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:62
Deprecation Notice: Required parameter $path follows optional parameter $schema in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:108
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
PHP Fatal error:  Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php:84
Stack trace:
#0 [internal function]: array_merge(fideloper/proxy: Array)
#1 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php(84): call_user_func_array('array_merge', Array)
#2 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(387): Composer\DependencyResolver\DefaultPolicy->selectPreferredPackages(Object(Composer\DependencyResolver\Pool), Array, Array, 'fideloper/proxy')
#3 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(742): Composer\DependencyResolver\Solver->selectAndInstall(1, Array, Array, Object(Composer\DependencyResolver\GenericRule))
#4 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(231): Composer\DependencyResolver\Solver->runSat(Array)
#5 phar:///usr/local/bin/composer/src/Composer/Installer.php(475): Composer\DependencyResolver\Solver->solve(Object(Composer\DependencyResolver\Request), false)
#6 phar:///usr/local/bin/composer/src/Composer/Installer.php(229): Composer\Installer->doInstall(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Repository\CompositeRepository), Object(Composer\Repository\PlatformRepository), Array)
#7 phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php(122): Composer\Installer->run()
#8 phar:///usr/local/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/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/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/bin/composer/src/Composer/Console/Application.php(258): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 phar:///usr/local/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/bin/composer/src/Composer/Console/Application.php(104): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 phar:///usr/local/bin/composer/bin/composer(61): Composer\Console\Application->run()
#15 /usr/local/bin/composer(24): require('phar:///usr/loc...')
#16 {main}
  thrown in phar:///usr/local/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/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php:84
Stack trace:
#0 [internal function]: array_merge(fideloper/proxy: Array)
#1 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php(84): call_user_func_array('array_merge', Array)
#2 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(387): Composer\DependencyResolver\DefaultPolicy->selectPreferredPackages(Object(Composer\DependencyResolver\Pool), Array, Array, 'fideloper/proxy')
#3 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(742): Composer\DependencyResolver\Solver->selectAndInstall(1, Array, Array, Object(Composer\DependencyResolver\GenericRule))
#4 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php(231): Composer\DependencyResolver\Solver->runSat(Array)
#5 phar:///usr/local/bin/composer/src/Composer/Installer.php(475): Composer\DependencyResolver\Solver->solve(Object(Composer\DependencyResolver\Request), false)
#6 phar:///usr/local/bin/composer/src/Composer/Installer.php(229): Composer\Installer->doInstall(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Repository\CompositeRepository), Object(Composer\Repository\PlatformRepository), Array)
#7 phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php(122): Composer\Installer->run()
#8 phar:///usr/local/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/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/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/bin/composer/src/Composer/Console/Application.php(258): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 phar:///usr/local/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/bin/composer/src/Composer/Console/Application.php(104): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 phar:///usr/local/bin/composer/bin/composer(61): Composer\Console\Application->run()
#15 /usr/local/bin/composer(24): require('phar:///usr/loc...')
#16 {main}
  thrown in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php on line 84

下記を叩いて、Composer自体のバージョンをアップデートすれば解決!

% composer self-update

他のところから落としてきた、composer.jsonの記法が新バージョンに対応していると、自身の環境のバージョンが古かったりするとこういうことが起きたりするので、把握しておくと便利ですね!

7
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?