前提・実現したいこと
composerでsymfonyのプロジェクトを作成しようとした際、下記エラーが出ました。
特にcomposerの設定などは変更してません。
どうすれば解決できますでしょうか。よろしくお願いいたします。
発生している問題・エラーメッセージ
PHP Fatal error: Uncaught Error: Call to undefined method Composer\DependencyResolver\Request::getFixedOrLockedPackages() in /Users/youplus/Public/nyuumon/vendor/symfony/flex/src/Flex.php:885 Stack trace: #0 [internal function]: Symfony\Flex\Flex->truncatePackages(Object(Composer\Plugin\PrePoolCreateEvent)) #1 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(170): call_user_func(Array, Object(Composer\Plugin\PrePoolCreateEvent)) #2 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(91): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Plugin\PrePoolCreateEvent)) #3 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/PoolBuilder.php(236): Composer\EventDispatcher\EventDispatcher->dispatch('pre-pool-create', Object(Composer\Plugin\PrePoolCreateEvent)) #4 phar:///usr/local/bin/composer/src/Composer/Repository/RepositorySet.php(233): Composer\DependencyResolver\PoolBuilder->buildPool(Array, Object(Composer\DependencyResolver\Request)) #5 ph in /Users/youplus/Public/nyuumon/vendor/symfony/flex/src/Flex.php on line 885 Fatal error: Uncaught Error: Call to undefined method Composer\DependencyResolver\Request::getFixedOrLockedPackages() in /Users/youplus/Public/nyuumon/vendor/symfony/flex/src/Flex.php:885 Stack trace: #0 [internal function]: Symfony\Flex\Flex->truncatePackages(Object(Composer\Plugin\PrePoolCreateEvent)) #1 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(170): call_user_func(Array, Object(Composer\Plugin\PrePoolCreateEvent)) #2 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(91): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Plugin\PrePoolCreateEvent)) #3 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/PoolBuilder.php(236): Composer\EventDispatcher\EventDispatcher->dispatch('pre-pool-create', Object(Composer\Plugin\PrePoolCreateEvent)) #4 phar:///usr/local/bin/composer/src/Composer/Repository/RepositorySet.php(233): Composer\DependencyResolver\PoolBuilder->buildPool(Array, Object(Composer\DependencyResolver\Request)) #5 ph in /Users/youplus/Public/nyuumon/vendor/symfony/flex/src/Flex.php on line 885
該当のソースコード
sudo mv composer.phar /usr/local/bin/composer/ chmod a+x /usr/local/bin/composer composer global update composer create-project symfony/website-skeleton nyuumon
補足情報(FW/ツールのバージョンなど)
composer 2.0.0-alpha
php 7.4.9
回答1件
あなたの回答
tips
プレビュー