I have upgraded from Magento 2.3.6-p1 to Magento 2.4.0 all went well regarding

composer update 
bin/magento s:up 
rm -rf var/cache/* var/page_cache/* generated/code/* 
bin/magento s:d:c 
bin/magento s:s:d -f

when trying to access the site it shows the below error both on the frontend and admin panel.

Fatal error: Declaration of Laminas\ServiceManager\ServiceLocatorInterface::get($name) must be compatible with Psr\Container\ContainerInterface::get(string $id) in /home/techhopc/mysite.com/vendor/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php on line 16

1 Answer 1


The issue was resolved by changing PHP 7.3 to PHP 7.4

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.