You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another improvement of DSN-based config is that switching from a database to another is easier. For example: switching to SQLite is as easy as changing the value of DB_URL. Before you had to comment/uncomment config options in /etc/packages/doctrine.yml:
I kept the "old" way because changing just a couple of parameters like the password or the db name seems easier with several vars. But we can definitely switch to a simple DSN (which should then be done for Swiftmailer as well for consistency).
This is the default config provided by Symfony Flex:
But maybe now it's the perfect time to switch to the simpler and more modern DSN-based alternative (like we do in the Symfony Demo app: https://github.com/symfony/symfony-demo/blob/master/app/config/parameters.yml.dist#L20). The perceived complexity is reduced significantly:
Another improvement of DSN-based config is that switching from a database to another is easier. For example: switching to SQLite is as easy as changing the value of
DB_URL
. Before you had to comment/uncomment config options in/etc/packages/doctrine.yml
:The text was updated successfully, but these errors were encountered: