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
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
./vendor/bin/doctrine-moduleInstallation of DoctrineModule uses composer. For composer documentation, please refer to getcomposer.org.
-
cd my/project/directory -
create a
composer.jsonfile with following contents (minimum stability is required since the module still has frequent updates):{ "minimum-stability": "dev", "require": { "doctrine/doctrine-module": "dev-master" } } -
install composer via
curl -s http://getcomposer.org/installer | php(on windows, download http://getcomposer.org/installer and execute it with PHP) -
run
php composer.phar install -
open
my/project/directory/configs/application.config.phpand add the following key to yourmodules:'DoctrineModule',
-
clone this module to
vendor/DoctrineModule -
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.
-
open
my/project/directory/configs/application.config.phpand add the following key to yourmodules:'DoctrineModule',
See the UPGRADE.md file.
