We are on Magento 2.3.5 with laminas lib packages.
Error is throwing "**Cannot declare class Zend_Http_Client, because the name is already in use in include called at /app/xxxxxx/vendor/composer/ClassLoader"**
when we used below code:
An error comes when using the class as follows:
$client = new \Zend\Http\Client();
Does anyone have an idea whether it is a problem with laminas-bridge
SOLVED
Iām able to resolve the issue by doing follows:
- Open the
composer.json
and Remove the below code from āconfigā block or set the "use-include-path"
to false.
"use-include-path": true
- move vendor folder to vendorbkup (
mv vendor vendobkup
)
composer install -vvv --profile
php bin/magento setup:upgrade && php bin/magento setup:di:compile && php bin/magento s:s:d
Magento has removed "config": { "use-include-path": true }
from 2.2.x versions