mirror of
https://github.com/symfony/recipes.git
synced 2026-09-15 17:16:24 +03:00
switched to use URLs instead of individual env vars for Doctrine and Swiftmailer
This commit is contained in:
@@ -1,14 +1,7 @@
|
||||
doctrine:
|
||||
dbal:
|
||||
driver: "%env(DB_DRIVER)%"
|
||||
host: "%env(DB_HOST)%"
|
||||
port: "%env(DB_PORT)%"
|
||||
dbname: "%env(DB_NAME)%"
|
||||
user: "%env(DB_USER)%"
|
||||
password: "%env(DB_PASSWORD)%"
|
||||
url: "%env(DB_URL)%"
|
||||
charset: UTF8
|
||||
# if using pdo_sqlite as your database driver, uncomment next line:
|
||||
# path: "%kernel.root_dir%/../var/data.db"
|
||||
orm:
|
||||
auto_generate_proxy_classes: "%kernel.debug%"
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore
|
||||
|
||||
@@ -7,12 +7,8 @@
|
||||
"src/": "%SRC_DIR%/"
|
||||
},
|
||||
"env": {
|
||||
"DB_DRIVER": "pdo_mysql",
|
||||
"DB_HOST": "127.0.0.1",
|
||||
"DB_PORT": "",
|
||||
"DB_NAME": "symfony",
|
||||
"DB_USER": "root",
|
||||
"DB_PASSWORD": ""
|
||||
"#1": "For a sqlite database, use: \"sqlite:///%kernel.root_dir%/../var/data.db\"",
|
||||
"DB_URL": "mysql://root@127.0.0.1:3306/symfony?charset=utf8mb4"
|
||||
},
|
||||
"aliases": ["doctrine", "orm"]
|
||||
}
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
swiftmailer:
|
||||
url: "%env(MAILER_URL)%"
|
||||
transport: "%env(MAILER_TRANSPORT)%"
|
||||
host: "%env(MAILER_HOST)%"
|
||||
port: "%env(MAILER_PORT)%"
|
||||
encryption: null
|
||||
auth_mode: null
|
||||
username: "%env(MAILER_USER)%"
|
||||
password: "%env(MAILER_PASSWORD)%"
|
||||
spool: { type: "memory" }
|
||||
|
||||
@@ -6,12 +6,8 @@
|
||||
"etc/": "%ETC_DIR%/"
|
||||
},
|
||||
"env": {
|
||||
"MAILER_URL": "",
|
||||
"MAILER_TRANSPORT": "smtp",
|
||||
"MAILER_HOST": "localhost",
|
||||
"MAILER_PORT": "25",
|
||||
"MAILER_USER": "",
|
||||
"MAILER_PASSWORD": ""
|
||||
"#1": "For Gmail as a transport, use: \"gmail://username:password\"",
|
||||
"MAILER_URL": "smtp://localhost:25&encryption=&auth_mode="
|
||||
},
|
||||
"aliases": ["mailer", "mail"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user