Skip to content

Update multiple entity managers #8980

Closed
@sergiu-popa

Description

@sergiu-popa

Can we update this article for SF4? https://symfony.com/doc/current/doctrine/multiple_entity_managers.html

This is the new default configurations for doctrine:

doctrine:
    dbal:
        # configure these for your database server
        driver: 'pdo_mysql'
        server_version: '5.7'
        charset: utf8mb4

        # With Symfony 3.3, remove the `resolve:` prefix
        url: '%env(resolve:DATABASE_URL)%'

This is an example of multiple connections using the url option:

doctrine:
    dbal:
        # configure these for your database server

        # With Symfony 3.3, remove the `resolve:` prefix
        default_connection: default

        connections:
            default:
                url: '%env(resolve:DATABASE_URL)%'
                driver: 'pdo_mysql'
                server_version: '5.7'
                charset: utf8mb4
            books:
                url: '%env(resolve:DATABASE_URL_BOOKS)%'

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionableClear and specific issues ready for anyone to take them.hasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions