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

Commit73c2a6d

Browse files
committed
Make custom Symfony configuration override the default one (Case 193180)
1 parent2e70f37 commit73c2a6d

10 files changed

+191
-191
lines changed

‎src/config.default.yml‎

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
parameters:
2+
env(MYSQL_HOST):'mysql'
3+
env(MYSQL_USER):'baton'
4+
env(MYSQL_PASSWORD):'baton'
5+
env(MYSQL_DATABASE):'baton'
6+
env(MYSQL_PORT):'3306'
7+
8+
mysql.host:'%env(MYSQL_HOST)%'
9+
mysql.user:'%env(MYSQL_USER)%'
10+
mysql.password:'%env(MYSQL_PASSWORD)%'
11+
mysql.db:'%env(MYSQL_DATABASE)%'
12+
mysql.port:'%env(MYSQL_PORT)%'
13+
14+
framework.trusted_hosts:['127.0.0.1', 'localhost', '%env(HOSTNAME)%']
15+
16+
app.logging.default_time_format:"Y-m-d H:i:s.u T"# with microseconds and timezone, a format also Splunk can understand
17+
app.logging.allow_inline_line_breaks:false
18+
19+
demo_mode:'%env(DEMO_MODE)%'
20+
env(DEMO_MODE):# default is null, set this environment variable on your server to enable demo mode and deactivate project imports via form
21+
22+
secret:"%env(SECRET)%"
23+
env(SECRET):"change_me"
24+
app.kiln.token:'%env(KILN_OAUTH_TOKEN)%'
25+
app.github.token:'%env(GITHUB_OAUTH_TOKEN)%'
26+
env(GITHUB_OAUTH_TOKEN):# default is null, set this environment variable on your server to communicate with private repositories on GitHub
27+
env(KILN_OAUTH_TOKEN):# default is null, set this environment variable on your server to communicate with repositories on Kiln
28+
29+
30+
framework:
31+
secret:"%secret%"
32+
router:{ resource: "%kernel.root_dir%/routing.yml" }
33+
form:
34+
enabled:true
35+
csrf_protection:
36+
enabled:false
37+
validation:{ enable_annotations: true }
38+
templating:{ engines: ['twig'] }
39+
translator:{ fallback: de_DE }
40+
session:
41+
save_path:null
42+
default_locale:de_DE
43+
trusted_hosts:"%framework.trusted_hosts%"
44+
45+
twig:
46+
strict_variables:"%kernel.debug%"
47+
form_themes:
48+
-'AppBundle:Form:fields.html.twig'
49+
50+
doctrine:
51+
dbal:
52+
host:"%mysql.host%"
53+
port:"%mysql.port%"
54+
dbname:"%mysql.db%"
55+
user:"%mysql.user%"
56+
password:"%mysql.password%"
57+
charset:utf8
58+
schema_filter:~^(?!(_dbversion$|_fixed_tableid$|wfd_))~
59+
server_version:5.7
60+
orm:
61+
auto_mapping:true
62+
63+
services:
64+
app.logging.web_processor:
65+
class:Monolog\Processor\WebProcessor
66+
arguments:[~, []]
67+
tags:
68+
-{ name: monolog.processor }
69+
70+
app.logging.line_formatter:
71+
class:Monolog\Formatter\LineFormatter
72+
arguments:
73+
-"%app.logging.default_line_format%"
74+
-"%app.logging.default_time_format%"
75+
calls:
76+
-[includeStacktraces, [true]]
77+
-[allowInlineLineBreaks, ["%app.logging.allow_inline_line_breaks%"]]

‎src/config.yml‎

Lines changed: 2 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,3 @@
11
imports:
2-
-{ resource: config.local.yml }
3-
4-
parameters:
5-
env(MYSQL_HOST):'mysql'
6-
env(MYSQL_USER):'baton'
7-
env(MYSQL_PASSWORD):'baton'
8-
env(MYSQL_DATABASE):'baton'
9-
env(MYSQL_PORT):'3306'
10-
11-
mysql.host:'%env(MYSQL_HOST)%'
12-
mysql.user:'%env(MYSQL_USER)%'
13-
mysql.password:'%env(MYSQL_PASSWORD)%'
14-
mysql.db:'%env(MYSQL_DATABASE)%'
15-
mysql.port:'%env(MYSQL_PORT)%'
16-
17-
framework.trusted_hosts:['127.0.0.1', 'localhost', '%env(HOSTNAME)%']
18-
19-
app.logging.default_time_format:"Y-m-d H:i:s.u T"# with microseconds and timezone, a format also Splunk can understand
20-
app.logging.allow_inline_line_breaks:false
21-
22-
demo_mode:'%env(DEMO_MODE)%'
23-
env(DEMO_MODE):# default is null, set this environment variable on your server to enable demo mode and deactivate project imports via form
24-
25-
secret:"%env(SECRET)%"
26-
env(SECRET):"change_me"
27-
app.kiln.token:'%env(KILN_OAUTH_TOKEN)%'
28-
app.github.token:'%env(GITHUB_OAUTH_TOKEN)%'
29-
env(GITHUB_OAUTH_TOKEN):# default is null, set this environment variable on your server to communicate with private repositories on GitHub
30-
env(KILN_OAUTH_TOKEN):# default is null, set this environment variable on your server to communicate with repositories on Kiln
31-
32-
33-
framework:
34-
secret:"%secret%"
35-
router:{ resource: "%kernel.root_dir%/routing.yml" }
36-
form:
37-
enabled:true
38-
csrf_protection:
39-
enabled:false
40-
validation:{ enable_annotations: true }
41-
templating:{ engines: ['twig'] }
42-
translator:{ fallback: de_DE }
43-
session:
44-
save_path:null
45-
default_locale:de_DE
46-
trusted_hosts:"%framework.trusted_hosts%"
47-
48-
twig:
49-
strict_variables:"%kernel.debug%"
50-
form_themes:
51-
-'AppBundle:Form:fields.html.twig'
52-
53-
doctrine:
54-
dbal:
55-
host:"%mysql.host%"
56-
port:"%mysql.port%"
57-
dbname:"%mysql.db%"
58-
user:"%mysql.user%"
59-
password:"%mysql.password%"
60-
charset:utf8
61-
schema_filter:~^(?!(_dbversion$|_fixed_tableid$|wfd_))~
62-
server_version:5.7
63-
orm:
64-
auto_mapping:true
65-
66-
services:
67-
app.logging.web_processor:
68-
class:Monolog\Processor\WebProcessor
69-
arguments:[~, []]
70-
tags:
71-
-{ name: monolog.processor }
72-
73-
app.logging.line_formatter:
74-
class:Monolog\Formatter\LineFormatter
75-
arguments:
76-
-"%app.logging.default_line_format%"
77-
-"%app.logging.default_time_format%"
78-
calls:
79-
-[includeStacktraces, [true]]
80-
-[allowInlineLineBreaks, ["%app.logging.allow_inline_line_breaks%"]]
2+
-{ resource: config.default.yml }
3+
-{ resource: config.local.yml, ignore_errors: true }

‎src/config_development.default.yml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
framework:
2+
router:{ resource: "%kernel.root_dir%/routing_development.yml" }
3+
profiler:
4+
enabled:true
5+
6+
web_profiler:
7+
toolbar:true
8+
9+
twig:
10+
cache:false
11+
12+
parameters:
13+
# Linebreaks for better readbility
14+
app.logging.allow_inline_line_breaks:true
15+
16+
# a lot of whitespace for better readability
17+
app.logging.default_line_format:"[%%datetime%%] [%%extra.unique_id%%]\n\n\t%%channel%%.%%level_name%%: %%message%%\n\n\tcontext: %%context%%\n\n\textra: %%extra%%\n\n"
18+
19+
services:
20+
# In development, use PsrLogMessageProcessor to expand "{value}" placeholders in log
21+
# messages with corresponding values from the log record context.
22+
#
23+
# This makes log messages easier to read. In production, however, we're not
24+
# using this as post-processing in Splunk is easier if we keep the messages and
25+
# context values apart.
26+
app.logging.psr_log_message_processor:
27+
class:Monolog\Processor\PsrLogMessageProcessor
28+
tags:
29+
-{ name: monolog.processor }
30+
31+
monolog:
32+
handlers:
33+
main:
34+
formatter:app.logging.line_formatter
35+
type:stream
36+
path:"%kernel.logs_dir%/%kernel.environment%.log"
37+
level:debug
38+
channels:['!event']

‎src/config_development.yml‎

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,4 @@
11
imports:
22
-{ resource: config.yml }
3+
-{ resource: config_development.default.yml }
34
-{ resource: config_development.local.yml, ignore_errors: true }
4-
5-
framework:
6-
router:{ resource: "%kernel.root_dir%/routing_development.yml" }
7-
profiler:
8-
enabled:true
9-
10-
web_profiler:
11-
toolbar:true
12-
13-
twig:
14-
cache:false
15-
16-
parameters:
17-
# Linebreaks for better readbility
18-
app.logging.allow_inline_line_breaks:true
19-
20-
# a lot of whitespace for better readability
21-
app.logging.default_line_format:"[%%datetime%%] [%%extra.unique_id%%]\n\n\t%%channel%%.%%level_name%%: %%message%%\n\n\tcontext: %%context%%\n\n\textra: %%extra%%\n\n"
22-
23-
services:
24-
# In development, use PsrLogMessageProcessor to expand "{value}" placeholders in log
25-
# messages with corresponding values from the log record context.
26-
#
27-
# This makes log messages easier to read. In production, however, we're not
28-
# using this as post-processing in Splunk is easier if we keep the messages and
29-
# context values apart.
30-
app.logging.psr_log_message_processor:
31-
class:Monolog\Processor\PsrLogMessageProcessor
32-
tags:
33-
-{ name: monolog.processor }
34-
35-
monolog:
36-
handlers:
37-
main:
38-
formatter:app.logging.line_formatter
39-
type:stream
40-
path:"%kernel.logs_dir%/%kernel.environment%.log"
41-
level:debug
42-
channels:['!event']

‎src/config_production.default.yml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# following https://github.com/symfony/recipes/blob/4fcfbbebe97e900ba47f94966a8ea4ab1080612d/doctrine/doctrine-bundle/1.12/config/packages/prod/doctrine.yaml
2+
doctrine:
3+
orm:
4+
metadata_cache_driver:
5+
type:pool
6+
pool:doctrine.system_cache_pool
7+
result_cache_driver:
8+
type:pool
9+
pool:doctrine.result_cache_pool
10+
query_cache_driver:
11+
type:pool
12+
pool:doctrine.system_cache_pool
13+
14+
framework:
15+
cache:
16+
pools:
17+
doctrine.result_cache_pool:
18+
adapter:cache.app
19+
doctrine.system_cache_pool:
20+
adapter:cache.system
21+
22+
parameters:
23+
app.logging.default_line_format:"[%%datetime%%] [%%extra.unique_id%%] %%channel%%.%%level_name%%: %%message%% [context: %%context%%] [extra: %%extra%%]\n"
24+
25+
# no line breaks, so that we only have one event in one line in splunk
26+
app.logging.allow_inline_line_breaks:false
27+
28+
monolog:
29+
handlers:
30+
main:
31+
type:fingers_crossed
32+
passthru_level:notice
33+
action_level:warning
34+
handler:nested
35+
nested:
36+
type:stream
37+
path:"%kernel.logs_dir%/symfony.log"
38+
level:info
39+
formatter:app.logging.line_formatter

‎src/config_production.yml‎

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,4 @@
11
imports:
22
-{ resource: config.yml }
3+
-{ resource: config_production.default.yml }
34
-{ resource: config_production.local.yml, ignore_errors: true }
4-
5-
# following https://github.com/symfony/recipes/blob/4fcfbbebe97e900ba47f94966a8ea4ab1080612d/doctrine/doctrine-bundle/1.12/config/packages/prod/doctrine.yaml
6-
doctrine:
7-
orm:
8-
metadata_cache_driver:
9-
type:pool
10-
pool:doctrine.system_cache_pool
11-
result_cache_driver:
12-
type:pool
13-
pool:doctrine.result_cache_pool
14-
query_cache_driver:
15-
type:pool
16-
pool:doctrine.system_cache_pool
17-
18-
framework:
19-
cache:
20-
pools:
21-
doctrine.result_cache_pool:
22-
adapter:cache.app
23-
doctrine.system_cache_pool:
24-
adapter:cache.system
25-
26-
parameters:
27-
app.logging.default_line_format:"[%%datetime%%] [%%extra.unique_id%%] %%channel%%.%%level_name%%: %%message%% [context: %%context%%] [extra: %%extra%%]\n"
28-
29-
# no line breaks, so that we only have one event in one line in splunk
30-
app.logging.allow_inline_line_breaks:false
31-
32-
monolog:
33-
handlers:
34-
main:
35-
type:fingers_crossed
36-
passthru_level:notice
37-
action_level:warning
38-
handler:nested
39-
nested:
40-
type:stream
41-
path:"%kernel.logs_dir%/symfony.log"
42-
level:info
43-
formatter:app.logging.line_formatter

‎src/config_test.default.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
framework:
2+
test:true
3+
session:
4+
storage_id:session.storage.filesystem
5+
6+
monolog:
7+
handlers:
8+
main:
9+
# Disable logging during test execution. Might be replaced by more advanced
10+
# strategies in the future, but for now this change avoids creation of files
11+
# and log output on the console during test runs.
12+
type:"Null"
13+

‎src/config_test.yml‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
11
imports:
22
-{ resource: config.yml }
3+
-{ resource: config_test.default.yml }
34
-{ resource: config_test.local.yml, ignore_errors: true }
4-
5-
framework:
6-
test:true
7-
session:
8-
storage_id:session.storage.filesystem
9-
10-
monolog:
11-
handlers:
12-
main:
13-
# Disable logging during test execution. Might be replaced by more advanced
14-
# strategies in the future, but for now this change avoids creation of files
15-
# and log output on the console during test runs.
16-
type:"Null"
17-

‎src/config_testing.default.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
parameters:
2+
app.logging.default_line_format:"[%%datetime%%] [%%extra.unique_id%%] %%channel%%.%%level_name%%: %%message%% [context: %%context%%] [extra: %%extra%%]\n"
3+
4+
# no line breaks, so that we only have one event in one line in splunk
5+
app.logging.allow_inline_line_breaks:false
6+
7+
monolog:
8+
handlers:
9+
main:
10+
type:fingers_crossed
11+
passthru_level:notice
12+
action_level:warning
13+
handler:nested
14+
nested:
15+
type:stream
16+
path:"%kernel.logs_dir%/symfony.log"
17+
level:info
18+
formatter:app.logging.line_formatter

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp