2013-02-01 37 views
-1

將ZF2 Libary更新至最新版本後,我的應用程序出現嚴重錯誤。在prev。版本1.0.6一切正常。我正在尋找錯誤的來源,但我無法找到它,我不知道。在Module.Config中,我的DI注入陣列可能有問題。希望有人有一個想法這裏發生了什麼:)將ZF2 Diary更新至2.1.0後出現致命錯誤

當我在模塊配置刪除我的洞DI設置...我的應用程序不會工作,因爲DI不工作,但致命的錯誤消失。 :/

致命錯誤:

Fatal error: Uncaught exception 'Zend\Di\Exception\MissingPropertyException' with message 'Missing instance/object for parameter route for Zend\Mvc\Router\Http\Segment::__construct' in ...\Zend\Di\Di.php:699

我的DI模塊配置:

'di'     => array(
     'definition' => array(
      'class' => array(
       'Application\View\Helper\LastActions'    => array(
        'setBenutzerMapper' => array(
         'required' => true 
        ), 
       ), 
       [...] 
      ) 
     ) 
    ), 

感謝

回答

-1

同樣的問題發生對我來說。我使用從https://github.com/Domi-cc/SmartyModule SmartyModule。它的使用上module.config.php但是我沒有看到長名字

'di' => array(
    'instance' => array(
     'alias' => array(
      // entity manager 
      'smarty_engine' => 'Smarty', 
     ), 

     'SmartyModule\View\Renderer\SmartyStrategy' => array(
      'parameters' => array(
       'smarty' => 'SmartyModule\View\Renderer\SmartyRenderer', 
      ), 
     ), 
. . . 
+1

路由器配置「迪」看到這裏修復 - https://github.com/weierophinney/zf2/commit/5af3c125557025ac91e0952d0f2ac9aeb0600834它解決了我問題。謝謝@ rb-cohen –

0

沒有爲這種過度在github上的問題,我有同樣的問題今天上午: https://github.com/zendframework/zf2/issues/3625

quickfix,直到p ATCH使得它在釋放,是從使用長文件名類似更改路由器配置「的Zend \的mvc \路由器\ HTTP \段」只是「部分」是這樣的:

'router' => array(
    'routes' => array(
     'restful' => array(
      'type' => 'Segment', 
      ...