doctrine / DoctrineModule

Doctrine Module for Laminas
http://www.doctrine-project.org/projects/doctrine-module.html
MIT License
398 stars 269 forks source link

Does not work with zf3 skeleton #658

Closed miholeus closed 4 years ago

miholeus commented 5 years ago

Module does not work with zf3 skeleton demo application. I created demo app

git clone git@github.com:miholeus/zf3demo.git
docker-compose up -d --build

Then I run command

docker-compose exec zf /var/www/vendor/bin/doctrine-module

and get the following error

Fatal error: Uncaught Zend\ServiceManager\Exception\ServiceNotFoundException: Unable to resolve service "doctrine.cli" to a factory; are you certain you provided it during configuration? in /var/www/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:687
Stack trace:
#0 /var/www/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(763): Zend\ServiceManager\ServiceManager->getFactory('doctrine.cli')
#1 /var/www/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(200): Zend\ServiceManager\ServiceManager->doCreate('doctrine.cli')
#2 /var/www/vendor/doctrine/doctrine-module/bin/doctrine-module.php(44): Zend\ServiceManager\ServiceManager->get('doctrine.cli')
#3 /var/www/vendor/doctrine/doctrine-module/bin/doctrine-module(4): include('/var/www/vendor...')
#4 {main}
  thrown in /var/www/vendor/zendframework/zend-servicemanager/src/ServiceManager.php on line 687

You can test it on your demo app (do not forget to update php version in Dockerfile)

composer create-project zendframework/skeleton-application testapp
cd testapp
docker-compose up -d --build
composer update
composer require doctrine/doctrine-module
docker-compose exec zf /var/www/vendor/bin/doctrine-module
TomHAnderson commented 4 years ago

This module has been migrated to Laminas