Class "Laminas\\View\\HelperPluginManager" not found after migration from zendframework2 to laminas

61 views Asked by At

I migratet my Project with the laminas migration tool from zendframework2 to laminas.

I get these issues when I try to Init my Application with:

Laminas\Mvc\Application::init(require 'config/application.config.php')->run();

PHP Warning: Class "Laminas\View\HelperPluginManager" not found in /var/www/html/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php on line 114

and

PHP Fatal error: Cannot declare class Zend\View\HelperPluginManager, because the name is already in use in /var/www/html/vendor/laminas/laminas-view/src/HelperPluginManager.php on line 22

The application is Runing on docker-compose with php:8.1-apache

The error is somewhere in the ServiceManager::get function. I wrote logs and the last log before the Error appears is in this function.

I have a require for the "laminas/laminas-view": "2.4.13" Module in my composer.json.

Does anyone has simular problems?

Thanks for help.

1

There are 1 answers

0
Kimneyyy On BEST ANSWER

I found the issue. The migration tool didn't migratet the laminas-view module. I manually migratet just this module again with the migration tool and used the changed code. Before in HelperPluginManager the namespace was:

namespace Zend\View;

now it is

namespace Laminas\View;