Skip to content

Use DSN-like strings to define credentials #572

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ doctrine:
dbal:
# if you don't want to use SQLite, change the URL in parameters.yml or set the DATABASE_URL environment variable
url: '%env(DATABASE_URL)%'

# instead of using a URL, you may also uncomment the following lines to configure your database
# driver: pdo_mysql
# host: '%database_host%'
# port: '%database_port%'
# dbname: '%database_name%'
# user: '%database_user%'
# password: '%database_password%'
# charset: UTF8

orm:
auto_generate_proxy_classes: '%kernel.debug%'
auto_mapping: true
Expand All @@ -83,8 +73,5 @@ doctrine:
# stores options that change from one server to another
#
swiftmailer:
transport: '%mailer_transport%'
host: '%mailer_host%'
username: '%mailer_user%'
password: '%mailer_password%'
spool: { type: memory }
url : '%env(MAILER_URL)%'
spool: { type: memory }
8 changes: 0 additions & 8 deletions app/config/config_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ web_profiler:
# swiftmailer:
# disable_delivery: true

# It's recommended to use a separate database for tests. This allows to have a
# fixed and known set of data fixtures, it simplifies the code of tests and it
# makes them more robust.
# In this case we just need to define a different path for the application database.
doctrine:
dbal:
path: "%kernel.project_dir%/var/data/blog_test.sqlite"

# this configuration simplifies testing URLs protected by the security mechanism
# See https://symfony.com/doc/current/cookbook/testing/http_authentication.html
security:
Expand Down
5 changes: 1 addition & 4 deletions app/config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,4 @@ parameters:

# If you don't use a real mail server, you can send emails via your Gmail account.
# see https://symfony.com/doc/current/cookbook/email/gmail.html
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
env(MAILER_URL): 'smtp://localhost:25?encryption=&auth_mode='
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<php>
<ini name="error_reporting" value="-1" />
<server name="KERNEL_DIR" value="app/" />
<env name="DATABASE_URL" value="sqlite:///var/data/blog_test.sqlite"/>
</php>

<testsuites>
Expand Down