Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make database configuration more flexible #77

Open
m-ober opened this issue Oct 13, 2022 · 1 comment
Open

Make database configuration more flexible #77

m-ober opened this issue Oct 13, 2022 · 1 comment

Comments

@m-ober
Copy link
Contributor

m-ober commented Oct 13, 2022

We would like to use postgres and connect via unix socket, which is not possible right now:

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

        url: '%env(resolve:DATABASE_URL)%'

It seems that unix sockets are not supported when using an url to connect to a pg database (it looks like unix sockets in the url parameter are supported with mysql). And even if we don't use unix sockets, charset: utf8mb4 will break the database connection because pg does not have such charset (it's mysql specific).

I'd maybe suggest to expose more doctrine settings. This should also be backwards compatible, because if I understand it correctly the url parameter takes precedence, if set.

@m-ober
Copy link
Contributor Author

m-ober commented Oct 14, 2022

/cc @mweinelt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant