Doctrine Bundle
Doctrine DBAL & ORM Bundle for the Symfony Framework.
Because Symfony 2 does not want to force or suggest a specific persistence solutions on the users
this bundle was removed from the core of the Symfony 2 framework. Doctrine2 will still be a major player
in the Symfony world and the bundle is maintained by developers in the Doctrine and Symfony communities.
IMPORTANT: This bundle is developed for Symfony 2.1 and up. For Symfony 2.0 applications the DoctrineBundle
is still shipped with the core Symfony repository.
What is Doctrine?
The Doctrine Project is the home of a selected set of PHP libraries primarily focused on providing persistence
services and related functionality. Its prize projects are a Object Relational Mapper and the Database Abstraction
Layer it is built on top of. You can read more about the projects below or view a list of all projects.
Object relational mapper (ORM) for PHP that sits on top of a powerful database abstraction layer (DBAL).
One of its key features is the option to write database queries in a proprietary object oriented SQL dialect
called Doctrine Query Language (DQL), inspired by Hibernates HQL. This provides developers with a powerful
alternative to SQL that maintains flexibility without requiring unnecessary code duplication.
DBAL is a powerful database abstraction layer with many features for database schema introspection,
schema management and PDO abstraction.
Installation
1. Old deps and bin/vendors way
Add the following snippets to "deps" files:
[doctrine-dbal]
git=http://github.com/doctrine/dbal.git
[doctrine-orm]
git=http://github.com/doctrine/doctrine2.git
[DoctrineBundle]
git=http://github.com/doctrine/DoctrineBundle.git
target=/bundles/Doctrine/Bundle/DoctrineBundle
2. Composer
Add the following dependencies to your projects composer.json file:
"require": {
# ..
"doctrine/doctrine-bundle": ">=2.1"
# ..
}
Documentation
See the Resources/docs folder more a full documentation.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
doctrine:
dbal:
default_connection: ~
types:
# Prototype
name:
class: ~ # Required
commented: true
connections:
# Prototype
name:
dbname: ~
host: localhost
port: ~
user: root
password: ~
charset: ~
path: ~
memory: ~
# The unix socket to use for MySQL
unix_socket: ~
# True to use as persistent connection for the ibm_db2 driver
persistent: ~
# The protocol to use for the ibm_db2 driver (default to TCPIP if ommited)
protocol: ~
# True to use dbname as service name instead of SID for Oracle
service: ~
# The session mode to use for the oci8 driver
sessionMode: ~
# True to use a pooled server with the oci8 driver
pooled: ~
# Configuring MultipleActiveResultSets for the pdo_sqlsrv driver
MultipleActiveResultSets: ~
driver: pdo_mysql
platform_service: ~
schema_filter: ~
logging: false
profiling: false
driver_class: ~
wrapper_class: ~
keep_slave: ~
options:
# Prototype
key: []
mapping_types:
# Prototype
name: []
slaves:
# Prototype
name:
dbname: ~
host: localhost
port: ~
user: root
password: ~
charset: ~
path: ~
memory: ~
# The unix socket to use for MySQL
unix_socket: ~
# True to use as persistent connection for the ibm_db2 driver
persistent: ~
# The protocol to use for the ibm_db2 driver (default to TCPIP if ommited)
protocol: ~
# True to use dbname as service name instead of SID for Oracle
service: ~
# The session mode to use for the oci8 driver
sessionMode: ~
# True to use a pooled server with the oci8 driver
pooled: ~
# Configuring MultipleActiveResultSets for the pdo_sqlsrv driver
MultipleActiveResultSets: ~
orm:
default_entity_manager: ~
auto_generate_proxy_classes: false
proxy_dir: %kernel.cache_dir%/doctrine/orm/Proxies
proxy_namespace: Proxies
entity_managers:
# Prototype
name:
query_cache_driver:
type: array
host: ~
port: ~
instance_class: ~
class: ~
id: ~
metadata_cache_driver:
type: array
host: ~
port: ~
instance_class: ~
class: ~
id: ~
result_cache_driver:
type: array
host: ~
port: ~
instance_class: ~
class: ~
id: ~
connection: ~
class_metadata_factory_name: Doctrine\ORM\Mapping\ClassMetadataFactory
default_repository_class: Doctrine\ORM\EntityRepository
auto_mapping: false
naming_strategy: doctrine.orm.naming_strategy.default
hydrators:
# Prototype
name: []
mappings:
# Prototype
name:
mapping: true
type: ~
dir: ~
alias: ~
prefix: ~
is_bundle: ~
dql:
string_functions:
# Prototype
name: []
numeric_functions:
# Prototype
name: []
datetime_functions:
# Prototype
name: []
# Register SQL Filters in the entity manager
filters:
# Prototype
name:
class: ~ # Required
enabled: false
parameters:
# Prototype
name: []
resolve_target_entities:
# Prototype
interface: []
-
Merge pull request #177 from dbu/doctrine-register-mappings-pass
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Merge pull request #180 from gimler/master_slave_command_fix
By beberlei, 16 days ago
-
Removed deprecated call
By stof, 20 days ago
-
ws fixes
By dbu, 26 days ago
-
improve doc on managerParameters
By dbu, 26 days ago
-
use drivers from common, not deprecated orm ones
By dbu, 29 days ago
-
adjust to https://github.com/symfony/symfony/pull/7755
By dbu, 29 days ago
-
fix drop and create command for connections with master slave configuration
By gimler, 1 month ago
-
fix issues on compiler pass
By dbu, 1 month ago
-
fix typo and cleanup docblock
By dbu, 1 month ago
-
refactor instantiation to use factory methods
By dbu, 1 month ago
-
add compiler pass for bundles to register mappings
By dbu, 1 month ago
-
Update composer.json
By fabpot, 1 month ago
-
Merge pull request #162 from JJK801/filters_doc
By guilhermeblanco, 2 months ago
-
Add filters documentation to configuration.rst
By Jérémy Jourdin, 2 months ago
-
Add filters documentation to configuration.rst
By Jérémy Jourdin, 2 months ago
-
Merge pull request #159 from JJK801/filters
By stof, 2 months ago

