PHP Fatal error: Declaration of Magento\ComposerRootUpdatePlugin\Plugin\Commands\OverrideRequireCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Composer\Command\RequireCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output)

i am using magento 2.4.3-p1 and composer 1, now when i update composer to 2 and run composer -v it gives me the above error

  • what is your PHP version?
    – paj
    Commented May 7 at 10:23

2 Answers 2


Magento 2.4.3 is quite an old version. Using composer 1 is needed I believe. You can switch composer version quite easily even if you run multiple sites on your server.

It seems possible to use both composer version simultaneously, see https://joostvanveen.com/run-composer-1-and-2-simultaniously


composer self-update --2 use this command

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.