When we upgrade Magento 2.4.6 then we might get deprecated Zend classes errors in custom modules because of some Zend class removed in Magento 2.4.6. In this blog I added some depreciated Zend classes alternative to fix those error.
We have some alternative of Zend
class are Laminas
classes and Magento
classes
Here is list of alternative of Zend classes.\Zend_Http_Client::POST
=> \Laminas\Http\Request::METHOD_POST
\Zend_Http_Client::GET
=> \Laminas\Http\Request::METHOD_GET
\Zend_Json
=> \Laminas\Json\Json
\Zend_Filter
=> \Magento\Framework\Filter\FilterInput
\Zend_Http_Client
=> \Laminas\Http\Request
\Zend_Http_Response
=> \Laminas\Http\Response
\Zend_Validate
=> \Laminas\Validator
\Zend_Filter_Input
=> \Magento\Framework\Filter\FilterInput
\Zend_Json_Exception
=> \Laminas\Json\Exception
\Zend_Db_Select
=> \Magento\Framework\DB\Select
\Zend_Filter_BaseName
=> \Laminas\Filter\BaseName
Magento\Framework\HTTP\ZendClient
=> Magento\Framework\HTTP\LaminasClient
Might be you getting below errors:
Error: Class “Zend_Http_Client” not found in
Error: Class “Zend_Json” not found in
Error: Class “Zend_Filter” not found in
Error: Class “Zend_Http_Response” not found in
Error: Class “Zend_Validate” not found in
Error: Class “Zend_Filter_Input” not found in
Error: Class “Zend_Json_Exception” not found in
Error: Class “Zend_Db_Select” not found in
Error: Class “Zend_Filter_BaseName” not found in
User Deprecated Functionality: Class is deprecated in vendor/magento/framework/HTTP/ZendClient.php on line 27
Might be this restricted_classes.php help to find alternative for Zend.
If you have error with zend class. If you didn’t find solution yet. please add comment with error. I will help you to fix it.
Here is post for upgrade magento.
How to upgrade magento 2.4.5-p1 to 2.4.6-p3 opensource.
I hope this blog is useful to know depreciated Zend classes alternative. Don’t heisted to leave a comment in this blog, I’ll get back with some positive approach. Thank you ❤️
Keep liking 👍 Keep loving ❤️ Keep inspiring 🤩 No sharing 📣