Skip to content

Error after upgrading Magento 2.4.3 to 2.4.5

After upgrading Magento from 2.4.3 to 2.4.4 (or 2.4.5), I cannot run any Magento CLI command. For example, setup upgrade command:

bin/magento setup:upgrade

generates the errors:

Interface “ZendStdlibJsonSerializable” not found#0
/var/www/magento2/vendor/composer/ClassLoader.php(571): include()
#1 /var/www/magento2/vendor/composer/ClassLoader.php(428): ComposerAutoloadincludeFile()
#2 [internal function]: ComposerAutoloadClassLoader->loadClass()
#3 /var/www/magento2/vendor/magento/framework/ObjectManager/Relations/Runtime.php(38):
class_exists()
#4 /var/www/magento2/vendor/magento/framework/Interception/Config/Config.php(157):
MagentoFrameworkObjectManagerRelationsRuntime->has()
#5 /var/www/magento2/vendor/magento/framework/Interception/Config/Config.php(180):
MagentoFrameworkInterceptionConfigConfig->_inheritInterception()
#6 /var/www/magento2/vendor/magento/framework/Interception/Config/Config.php(213):
MagentoFrameworkInterceptionConfigConfig->hasPlugins()
#7 /var/www/magento2/vendor/magento/framework/Interception/Config/Config.php(190):
MagentoFrameworkInterceptionConfigConfig->generateIntercepted()
#8 /var/www/magento2/vendor/magento/framework/Interception/Config/Config.php(122):
MagentoFrameworkInterceptionConfigConfig->initializeUncompiled()
#9 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121):
MagentoFrameworkInterceptionConfigConfig->__construct()
#10 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66):
MagentoFrameworkObjectManagerFactoryAbstractFactory->createObject()
#11 /var/www/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70):
MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create()
#12 /var/www/magento2/vendor/magento/framework/App/ObjectManager/Environment/Developer.php(84):
MagentoFrameworkObjectManagerObjectManager->get()
#13 /var/www/magento2/vendor/magento/framework/App/ObjectManagerFactory.php(191):
MagentoFrameworkAppObjectManagerEnvironmentDeveloper->configureObjectManager()
#14 /var/www/magento2/vendor/magento/framework/App/Bootstrap.php(212): MagentoFrameworkAppObjectManagerFactory->create()
#15 /var/www/magento2/vendor/magento/framework/App/Bootstrap.php(127): MagentoFrameworkAppBootstrap->__construct()
#16 /var/www/magento2/vendor/magento/framework/Console/Cli.php(185): MagentoFrameworkAppBootstrap::create()
#17 /var/www/magento2/vendor/magento/framework/Console/Cli.php(85): MagentoFrameworkConsoleCli->initObjectManager()
#18 /var/www/magento2/bin/magento(22): MagentoFrameworkConsoleCli->__construct()
#19 {main}

I tried by removing all cache’s, generated codes etc, but I receive always this error. How can I fix it?

I also receive the below error:

bin/magento setup:upgrade

Class ‘ZendMimeMime’ not found#0
/var/www/magento2/vendor/magento/framework/Code/Generator/EntityAbstract.php(366):
ReflectionParameter->getDefaultValue()
#1 /var/www/magento2/vendor/magento/framework/Code/Generator/EntityAbstract.php(396):
MagentoFrameworkCodeGeneratorEntityAbstract->extractParameterDefaultValue()
#2 [internal function]: MagentoFrameworkCodeGeneratorEntityAbstract->_getMethodParameterInfo()
#3 /var/www/magento2/vendor/magento/framework/Interception/Code/Generator/Interceptor.php(103):
array_map()
#4 /var/www/magento2/vendor/magento/framework/Interception/Code/Generator/Interceptor.php(76):
MagentoFrameworkInterceptionCodeGeneratorInterceptor->_getMethodInfo
….
#65 /var/www/magento2/vendor/symfony/console/Application.php(149): MagentoFrameworkConsoleCli->doRun()
#66 /var/www/magento2/bin/magento(23): SymfonyComponentConsoleApplication->run()
#67 {main}