I am creating a new website with Magento 2. I have received several warnings on Zend Framework with Composer and so I followed instructions to Migrate to Laminas.
Everything seems to have gone well.
But now I can’t run several commands (for example the operations of data-migration tool)
The error is always the same:
PHP Fatal error: Cannot declare class Zend\Mvc\Controller\LazyControllerAbstractFactory, because the name is already in use in /var/www/html/magento2/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php on line 78
I can’t get over the problem.
Can someone help me?
Hello and welcome to the forums!
so I followed instructions to Migrate to Laminas.
Don’t do that and ignore the message. Everything will run without the migration.
Migrate only your own code and not the code from external libraries or dependencies.
There are already issue reports for this topic:
So can I avoid migration to Laminas?
Now that I’ve already done it, is there a way to go back or is it better to reinstall Magento 2 from scratch?
Will probably be the best and easiest way.