2
respostas

Erro ao tentar visualizaos modulos " ./vendor/bin/zf.php modules"

$ ./vendor/bin/zf.php modules

Fatal error: Uncaught exception 'Zend\ModuleManager\Listener\Exception\RuntimeException' with message 'Could not find a valid ServiceManager for RoutePluginManager' in C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-modulemanager\src\Listener\ServiceListener.php:202 Stack trace:

0 C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-eventmanager\src\EventManager.php(322): Zend\ModuleManager\Listener\ServiceListener->onLoadModulesPost(Object(Zend\ModuleManager\ModuleEvent))

1 C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-eventmanager\src\EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\ModuleManager\ModuleEvent))

2 C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-modulemanager\src\ModuleManager.php(129): Zend\EventManager\EventManager->triggerEvent(Object(Zend\ModuleManager\ModuleEvent))

3 C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-mvc\src\Application.php(264): Zend\ModuleManager\ModuleManager->loadModules()

4 C:\xampp\htdo in C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-modulemanager\src\Listener\ServiceListener.php on line 202

PHP Fatal error: Uncaught exception 'Zend\ModuleManager\Listener\Exception\RuntimeException' with message 'Could not find a valid ServiceManager for RoutePluginManager' in C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-modulemanager\src\Listener\ServiceListener.php:202 Stack trace:

0 C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-eventmanager\src\EventManager.php(322): Zend\ModuleManager\Listener\ServiceListener->onLoadModulesPost(Object(Zend\ModuleManager\ModuleEvent))

1 C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-eventmanager\src\EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\ModuleManager\ModuleEvent))

2 C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-modulemanager\src\ModuleManager.php(129): Zend\EventManager\EventManager->triggerEvent(Object(Zend\ModuleManager\ModuleEvent))

3 C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-mvc\src\Application.php(264): Zend\ModuleManager\ModuleManager->loadModules()

4 C:\xampp\htdo in C:\xampp\htdocs\estudo-alura\Zend\vendor\zendframework\zend-modulemanager\src\Listener\ServiceListener.php on line 202

2 respostas

Dando uma olhada : https://github.com/zendframework/zend-modulemanager/issues/42

Parece que o Router agora é um plugin no ZF. Tenta Verificar lá na sua pasta vendor/zendframework se tem a pasta zend-router. Se sim, abre o arquivo application.config.php e adiciona aos "modules":

'Zend\Router'

Espero ter ajudado =)

Abraço e bons estudos.

Estou com o problema parecido, e aqui não está funcionando, não entendi direito onde coloco o 'Zend\Router' seria isso mesmo? Obrigado