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

Get DB parameters from Symfony 4 .env file #35

Closed
elvismdev opened this issue Mar 2, 2018 · 2 comments · Fixed by #39
Closed

Get DB parameters from Symfony 4 .env file #35

elvismdev opened this issue Mar 2, 2018 · 2 comments · Fixed by #39

Comments

@elvismdev
Copy link

Hi again,

So now I encounter with the issue that in new SF4 the way to define the DB details are in a one line only, and not with each piece (user, pass, host, dbname) being separated like this bundle needs.

https://symfony.com/doc/current/configuration.html#the-env-file-environment-variables

###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
DATABASE_URL=mysql://root:root@127.0.0.1:3306/test_db
###< doctrine/doctrine-bundle ###

Is there a way backup-manager bundle can get/resolve all the database parameters needed from this DATABASE_URL environment variable?

@Nyholm
Copy link
Member

Nyholm commented Mar 2, 2018

That is an excellent feature. Thank you

I will see if I can make this work

@Nyholm
Copy link
Member

Nyholm commented Mar 3, 2018

Thank you for reporting these issues. I've released 2.1.0 now.

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

Successfully merging a pull request may close this issue.

2 participants