ezsystems/ezpublish-kernel — pull request #736 by lolautruche (2014-02-14 18:04:29+00:00)
Title: Fix EZP-22279: Integrate storage engine configuration with DoctrineBundle connections

**Work in progress**
https://jira.ez.no/browse/EZP-22279

This PR adds native support of DoctrineBundle, for DBAL configuration (ORM **not included**).

Added notion of *repository* in the configuration.
Repositories are declared globally and used/specified at the SiteAccess level (or group).

A repository consists of an *engine* (to specify which storage engine to use), and config options for that engine.
In the case of `legacy`, aka LegacyStorageEngine, a Doctrine *connection* is specified, which is configured in DoctrineBundle.

Example of semantic configuration:

```yaml
# Using Doctrine default connection
doctrine:
dbal:
driver: pdo_mysql
host: localhost
port: 3306
dbname: ezdemo
user: root
password: root
charset: UTF8

ezpublish:
repositories:
# Takes all default values (type: legacy, connection: default)
main: ~

system:
ezdemo_group:
# Optional, if not provided, will take the first defined repository by default
repository: main

#####

# Using a named Doctrine connection
doctrine:
dbal:
default_connection: default
connections:
default:
dbname: Symfony2
user: root
password: null
host: localhost
my_connection:
dbname: customer
user: root
password: null
host: localhost

ezpublish:
repositories:
main:
# legacy => Legacy storage engine
type: legacy
connection: my_connection
```