Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Zend Framework 2 Module for Doctrine
Pull request Compare This branch is 2 commits ahead, 555 commits behind doctrine:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Doctrine Module for Zend Framework 2

Master: Build Status

The Doctrine module intends to integrate Doctrine 2 with Zend Framework 2 quickly and easily. This module is a provides common Doctrine and ZF integration. To get the most benefit you must use a provider module such as DoctrineORMModule. The following features are intended to work out of the box:

  • CLI support for Doctrine 2 ORM and Doctrine MongoDB ODM.
  • Validators for ObjectExists and NoObjectExists
  • Authentication adapter for Zend\Authenticator
  • Support for using existing PDO connections


Zend Framework 2

Doctrine CLI

The Doctrine CLI has been pre-configured for you and works as is without any special configuration required for MongoODM and ORM. It will just use your configuration for those modules.

Access the Doctrine command line through



Installation of DoctrineModule uses composer. For composer documentation, please refer to

Installation steps

  1. cd my/project/directory
  2. create a composer.json file with following contents (minimum stability is required since the module still has frequent updates):

         "minimum-stability": "dev",
         "require": {
             "doctrine/doctrine-module": "dev-master"
  3. install composer via curl -s | php (on windows, download and execute it with PHP)
  4. run php composer.phar install
  5. open my/project/directory/configs/application.config.php and add the following key to your modules:


Installation steps (without composer)

  1. clone this module to vendor/DoctrineModule
  2. setup PSR-0 autoloading for namespace DoctrineModule (the directory where the classes in this namespace live is vendor/DoctrineModule/src/DoctrineModule.
  3. The module depends on Doctrine Common 2.3.*, Doctrine Data-Fixtures, Symfony Console >= 2.0.13, Symfony Yaml >= 2.0.13 , Zend Framework > 2.0.0-beta5 . You have to download/install those packages and have them autoloaded.
  4. open my/project/directory/configs/application.config.php and add the following key to your modules:



See the file.

Something went wrong with that request. Please try again.