ZF2 + doctrine without composer

后端 未结 3 1468
野趣味
野趣味 2020-12-21 16:37

I have a working ZF2 (skeleton) application and want to integrate Doctrine.

I have downloaded the 2 modules (DoctrineModule and DoctrineORMModule) from github as I\'

3条回答
  •  [愿得一人]
    2020-12-21 16:50

    Try to edit the following method in the Module.php of the Application module:

    public function getAutoloaderConfig()
    {
        return array(
            'Zend\Loader\StandardAutoloader' => array(
                'namespaces' => array(
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
                    'Doctrine' => //Path where your doctrine dist resides
                ),
            ),
        );
    }
    

    There is no need to define autoloading configuration for DoctrineModule and DoctrineORMModule because this are ZF2 modules and are providing autoloading configuration already.

提交回复
热议问题