Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit 6c4739b

Browse files
committed
feature #776 Move %locale% to config.yml (gerryvdm)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #776). Discussion ---------- Move %locale% to config.yml As per the official best practices, parameters.yml should be reserved for infrastrucure-related parameters. The default locale is a parameter which typically is application related, so I suggest moving it to config.yml. Commits ------- f0f9582 Move %locale% to config.yml
2 parents 707ec3c + f0f9582 commit 6c4739b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

app/config/config.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ imports:
33
- { resource: security.yml }
44
- { resource: services.yml }
55

6+
# Put parameters here that don't need to change on each machine where the app is deployed
7+
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
8+
parameters:
9+
locale: en
10+
611
framework:
712
#esi: ~
813
#translator: { fallbacks: ["%locale%"] }
@@ -46,7 +51,7 @@ assetic:
4651
# Doctrine Configuration
4752
doctrine:
4853
dbal:
49-
driver: "%database_driver%"
54+
driver: pdo_mysql
5055
host: "%database_host%"
5156
port: "%database_port%"
5257
dbname: "%database_name%"

app/config/parameters.yml.dist

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file is a "template" of what your parameters.yml file should look like
2+
# Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production.
3+
# http://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
24
parameters:
3-
database_driver: pdo_mysql
45
database_host: 127.0.0.1
56
database_port: ~
67
database_name: symfony
@@ -14,7 +15,5 @@ parameters:
1415
mailer_user: ~
1516
mailer_password: ~
1617

17-
locale: en
18-
1918
# A secret key that's used to generate certain security-related tokens
2019
secret: ThisTokenIsNotSoSecretChangeIt

0 commit comments

Comments
 (0)