I am using magento version 2.3.1

When I have updated composer via command

php composer update

I get this error

Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.

Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.

please anyone guide me how to solve this error

currently not working any command, giving same error when run command

thanks in advance

  • Did you get any solution for this ? Dec 23, 2019 at 7:00
  • not yet, can you please guide here Dec 23, 2019 at 9:56
  • you can ignore this error and the composer update run successfully Dec 23, 2019 at 11:21
  • It comes up a lot during Composer installations. The module still installed, the message is just a false-positive. If it failed, the message would clearly state that. Dec 23, 2019 at 11:21
  • 1
    The only places your issue 'container-interop' is mentioned is in the two files located in the places I've referenced above. These two location paths have the words 'testing' or 'dev/tests', which suggests its not part of the live site, but maybe legacy testing code. I dont know the answer to this problem though as I'm also having it with about 20 other deprecated packages.
    – Chris
    Feb 19, 2020 at 14:11

2 Answers 2


It's not an error, it's a warning. Informing you that the package container-interop/container-interop is abandoned not receiving new updates. It is up to you whether you want to continue using container-interop/container-interop or decide to use the package psr/container which still receives updates.

When making a decision take account with security and functionality. I wouldn't recommend changing here unless the old packages receives errors due to other packages being updatet.


Try this, that should do the trick

composer remove container-interop/container-interop
composer require psr/container
  • Thanks for answer, I will try and let you know :) Nov 27, 2019 at 9:49
  • I tried this but got the following "container-interop/container-interop is not required in your composer.json and has not been removed"
    – Chris
    Feb 19, 2020 at 13:02
  • Do this solution works? Jul 28, 2020 at 8:01
  • Clearly it must not work but I can look into it more if you need? Jul 28, 2020 at 18:19

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.