Hi i'm trying to install doctrine2 to zf2 via composer.
I'm getting error:
Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (DoctrineModule) could not be initialized.'
I followed this 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 needed doctrine librarys are in vendor/doctrine directory. I guess it's something wrong with autoloading.
After composer update i get message:
[ErrorException]
proc_open(): CreateProcess failed, error code - 267
i can't tell wath it means, but maybe this will be helpfull.
Second thing is that on https://github.com/doctrine/DoctrineORMModule there is section:
Installation steps (without composer)
and point 3. setup PSR-0 autoloading for namespace DoctrineORMModule
...where can I setup this thing ?
If some of vendor folders was created on another machine, this can lead to the error you got. So perform the following.
composer.lock
and ./vendor
folder. php composer.phar self-update
php composer.phar install
to re-install dependencies.As of https://github.com/composer/composer/issues/1063 and https://github.com/composer/composer/issues/1346 this looks like a problem with the setup of PHP under your environment (which I assume is windows).
The modules weren't installed correctly and composer did not dump the autoloader correctly because it crashed during the installation process.
Try repeating the installation process in a different path and check that you're using the latest version of composer with php composer.phar self-update
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With