Zf2 module (DoctrineModule) cannot be initialized

Hi, I am trying to install doctrine2 in zf2 via composer. I get the error: Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (DoctrineModule) could not be initialized.' I followed the following steps https://github.com/doctrine/DoctrineORMModule

my application.config looks like this:

 return array( 'modules' => array( 'Application', 'DoctrineModule', 'DoctrineORMModule', 'Album', 'User' ), 'module_listener_options' => array( 'config_glob_paths' => array( 'config/autoload/{,*.}{global,local}.php', ), 'module_paths' => array( './module', './vendor', ), ), ); 

My composer .json:

 "minimum-stability": "dev", "require": { "php": ">=5.3.3", "zendframework/zendframework": "2.*", "doctrine/doctrine-orm-module": "dev-master", "zendframework/zend-developer-tools": "*", "bjyoungblood/bjy-profiler": "*" }, 

All necessary doctrine libraries are located in the supplier / doctrine directory. I guess something is wrong with startup.
After updating the composer, I get the message: [ErrorException] proc_open(): CreateProcess failed, error code - 267 I can’t say what this means, but it may be useful.

Secondly, at https://github.com/doctrine/DoctrineORMModule there is a section: Installation steps (without composer) and point 3. setup PSR-0 autoloading for namespace DoctrineORMModule ... where can I configure this thing?

+6
source share
2 answers

From https://github.com/composer/composer/issues/1063 and https://github.com/composer/composer/issues/1346 this seems like a problem with setting up PHP in your environment (I suppose these are windows).

The modules were not installed correctly, and the composer did not reset the autoloader correctly because it crashed during the installation process.

Try to repeat the installation process in a different way and make sure that you are using the latest composer version with php composer.phar self-update

+3
source

If some vendor folders were created on another computer, this may result in an error. Therefore, follow these steps.

  • Try deleting the composer.lock and ./vendor .
  • Then php composer.phar self-update
  • Run php composer.phar install to reinstall the dependencies.
+4
source

All Articles