Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2e70f37

Browse files
committed
Allow loading custom Symfony configuration (Case 193180)
1 parent3e9ffc1 commit2e70f37

File tree

6 files changed

+20
-0
lines changed

6 files changed

+20
-0
lines changed

‎README.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ Set it as the value of the environment variable `GITHUB_OAUTH_TOKEN` on your ser
6868

6969
The same goes for Kiln repositories. Store your Kiln OAuth token in the`KILN_OAUTH_TOKEN` environment variable on your server.
7070

71+
###Overriding Symfony configuration
72+
73+
You can add your custom Symfony configuration by providing any of
74+
-`config.local.yml`
75+
-`config_development.local.yml`
76+
-`config_production.local.yml`
77+
-`config_test.local.yml`
78+
-`config_testing.local.yml`
79+
80+
in the`src/` directory.
81+
82+
This allows adding custom configuriation (like custom loggin configuration) without changing any files versioned by git.
83+
7184
##Features
7285

7386
###Import Projects

‎src/config.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
imports:
2+
-{ resource: config.local.yml }
3+
14
parameters:
25
env(MYSQL_HOST):'mysql'
36
env(MYSQL_USER):'baton'

‎src/config_development.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
imports:
22
-{ resource: config.yml }
3+
-{ resource: config_development.local.yml, ignore_errors: true }
34

45
framework:
56
router:{ resource: "%kernel.root_dir%/routing_development.yml" }

‎src/config_production.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
imports:
22
-{ resource: config.yml }
3+
-{ resource: config_production.local.yml, ignore_errors: true }
34

45
# following https://github.com/symfony/recipes/blob/4fcfbbebe97e900ba47f94966a8ea4ab1080612d/doctrine/doctrine-bundle/1.12/config/packages/prod/doctrine.yaml
56
doctrine:

‎src/config_test.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
imports:
22
-{ resource: config.yml }
3+
-{ resource: config_test.local.yml, ignore_errors: true }
34

45
framework:
56
test:true

‎src/config_testing.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
imports:
22
-{ resource: config_production.yml }
3+
-{ resource: config_test.local.yml, ignore_errors: true }
34

45
parameters:
56
app.logging.default_line_format:"[%%datetime%%] [%%extra.unique_id%%] %%channel%%.%%level_name%%: %%message%% [context: %%context%%] [extra: %%extra%%]\n"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp