Sean Breeden

Full Stack PHP, Python, AI/ML Developer
"AI won’t replace you, but people who are using AI will replace you" --Anonymous

The Zend Body Problem: Upgrading Magento 2.4.5 to 2.4.6.

Tuesday, April 2nd, 2024

As of Magento 2.4.6, Zend has been replaced by Laminas. When upgrading to 2.4.6, custom modules may no longer function. There are a few errors like this that will pop up in the logs:

Class Zend_Json not found

The fix is to replace Zend_Json with \Laminas\Json\Json

Here is a fairly comprehensive list of Zend → Laminas classes that need to be replaced:

\Zend_Json\Laminas\Json\Json
\Zend_Http_Client::POST\Laminas\Http\Request::METHOD_POST
\Zend_Http_Client::GET\Laminas\Http\Request::METHOD_GET
\Zend_Validate\Laminas\Validator
\Zend_Filter\Magento\Framework\Filter\FilterInput
\Zend_Filter_Input\Magento\Framework\Filter\FilterInput
\Zend_Json_Exception\Laminas\Json\Exception
\Zend_Db_Select\Magento\Framework\DB\Select
\Zend_Http_Client\Laminas\Http\Request
\Zend_Http_Response\Laminas\Http\Response
\Zend_Filter_BaseName\Laminas\Filter\BaseName
Magento\Framework\HTTP\ZendClient                 Magento\Framework\HTTP\LaminasClient


 

 


(image generated by DALL-E on ChatGPT-4)

Views: 224
| Home | Announcements | Artificial Intelligence | Commodore 64 | CraftCMS | Crypto | Games | Geek | Machine Learning | Magento | Memes | Science News | Security | 7 Days to Die | Ubuntu |