我正在尝试将DoctrineORMModule
模块与之集成,ZF2 RC2
但我遇到了问题。我./composer.json
的如下并且php composer.phar update
运行良好:
"require": {
"php": ">=5.3.3",
"doctrine/data-fixtures": "dev-master",
"doctrine/doctrine-module": "dev-master",
"doctrine/orm": ">2.2,<2.4-dev",
"doctrine/dbal": ">2.2,<2.4-dev",
"doctrine/migrations": "dev-master",
"zendframework/zendframework": "dev-master#a59928a3a37e420193939f9799ece27fb39bb84e"
},
"autoload": {
"psr-0": {
"DoctrineORMModule": "src/",
"DoctrineORMModuleTest": "tests/"
}
}
但是,添加的模块之一./application/application.config.php
会导致问题:
'modules' => array(
'Application',
'DoctrineModule', // WORKS FINE
'DoctrineORMModule', // 'Module (DoctrineORMModule) could not be initialized.'
),
这在我发出./vendor/bin/doctrine-module
命令时得到确认:
PHP 致命错误:未捕获的异常 'Zend\ModuleManager\Exception\RuntimeException' 带有消息“模块(DoctrineORMModule)无法初始化。” 在 ./vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php:139
如果我在我的vendor
目录中搜索 Doctrine 名称空间,我可以找到DoctrineModule
(grep "namespace DoctrineModule" -R ./vendor
找到东西)但不是DoctrineORMModule
(grep "namespace DoctrineORMModule" -R ./vendor
没有)的名称空间。
DoctrineORMModule
为了与之集成,我缺少什么ZF2 RC2
?