@@ -135,8 +135,7 @@ trusted_proxies
135
135
136
136
**type **: ``array ``
137
137
138
- Configures the IP addresses that should be trusted as proxies. It becomes the
139
- service container parameter called ``kernel.trusted_proxies ``.
138
+ Configures the IP addresses that should be trusted as proxies.
140
139
141
140
.. seealso ::
142
141
@@ -211,23 +210,22 @@ test
211
210
212
211
**type **: ``boolean ``
213
212
214
- If this configuration parameter is present (and not ``false ``), then the
215
- services related to testing your application (e.g. ``test.client ``) are loaded.
216
- This setting should be present in your ``test `` environment (usually via
213
+ If this configuration setting is present (and not ``false ``), then the services
214
+ related to testing your application (e.g. ``test.client ``) are loaded. This
215
+ setting should be present in your ``test `` environment (usually via
217
216
``app/config/config_test.yml ``).
218
217
219
218
.. seealso ::
220
219
221
- For more information, see :doc: `/book/testing `.
220
+ For more information, see :doc: `/book/testing `.
222
221
223
222
default_locale
224
223
~~~~~~~~~~~~~~
225
224
226
225
**type **: ``string `` **default **: ``'en' ``
227
226
228
227
The default locale is used if no ``_locale `` routing parameter has been set. It
229
- becomes the service container parameter named ``kernel.default_locale `` and it
230
- is also available with the
228
+ is available with the
231
229
:method: `Request::getDefaultLocale <Symfony\\ Component\\ HttpFoundation\\ Request::getDefaultLocale> `
232
230
method.
233
231
@@ -252,14 +250,13 @@ might have been manipulated by an attacker.
252
250
You can read "`HTTP Host header attacks `_" for more information about these
253
251
kinds of attacks.
254
252
255
- The Symfony :method: `Request::getHost()
256
- <Symfony\\ Component\\ HttpFoundation\\ Request:getHost> ` method might be
257
- vulnerable to some of these attacks because it depends on the configuration of
258
- your web server. One simple solution to avoid these attacks is to whitelist the
259
- hosts that your Symfony application can respond to. That's the purpose of this
260
- ``trusted_hosts `` option. If the incoming request's hostname doesn't match one
261
- in this list, the application won't respond and the user will receive a 500
262
- response.
253
+ The Symfony :method: `Request::getHost() <Symfony\\ Component\\ HttpFoundation\\ Request:getHost> `
254
+ method might be vulnerable to some of these attacks because it depends on the
255
+ configuration of your web server. One simple solution to avoid these attacks is
256
+ to whitelist the hosts that your Symfony application can respond to. That's the
257
+ purpose of this ``trusted_hosts `` option. If the incoming request's hostname
258
+ doesn't match one in this list, the application won't respond and the user will
259
+ receive a 500 response.
263
260
264
261
.. configuration-block ::
265
262
@@ -293,8 +290,8 @@ response.
293
290
'trusted_hosts' => array('acme.com', 'acme.org'),
294
291
));
295
292
296
- Hosts can also be configured using regular expressions (e.g.
297
- `` .*\.?acme.com$ ``), which make it easier to respond to any subdomain.
293
+ Hosts can also be configured using regular expressions (e.g. `` .*\.?acme.com$ ``),
294
+ which make it easier to respond to any subdomain.
298
295
299
296
In addition, you can also set the trusted hosts in the front controller using
300
297
the ``Request::setTrustedHosts() `` method::
@@ -349,8 +346,7 @@ enabled
349
346
**type **: ``boolean `` **default **: ``true ``
350
347
351
348
Whether to enable the CSRF support in forms or not. Setting this option to
352
- ``true `` requires the `secret `_ to be set and `session `_ to be enabled. It
353
- becomes the service container parameter named ``form.type_extension.csrf.enabled ``.
349
+ ``true `` requires the `secret `_ to be set and `session `_ to be enabled.
354
350
355
351
This option will automatically be set to ``true `` when one of the child
356
352
settings is configured.
@@ -364,8 +360,7 @@ field_name
364
360
365
361
**type **: ``string `` **default **: ``'_token' ``
366
362
367
- The name of the hidden field containing the CSRF token in the form. It becomes
368
- the service container parameter named ``form.type_extension.csrf.field_name ``.
363
+ The name of the hidden field containing the CSRF token in the form.
369
364
370
365
esi
371
366
~~~
444
439
**type **: ``string `` **default **: ``'/_fragment' ``
445
440
446
441
The path prefix for fragments. The fragment listener will only be executed
447
- when the request starts with this path. It becomes the service container
448
- parameter called ``fragment.path ``.
442
+ when the request starts with this path.
449
443
450
444
profiler
451
445
~~~~~~~~
@@ -469,8 +463,8 @@ and ``test`` environments.
469
463
.. note ::
470
464
471
465
The profiler works independently from the Web Developer Toolbar, see the
472
- :doc: `WebProfilerBundle configuration
473
- </reference/configuration/web_profiler>` on how to disable/enable it .
466
+ :doc: `WebProfilerBundle configuration < /reference/configuration/web_profiler >`
467
+ on how to disable/enable the toolbar .
474
468
475
469
collect
476
470
.......
@@ -484,9 +478,10 @@ collect
484
478
**type **: ``boolean `` **default **: ``true ``
485
479
486
480
This option configures the way the profiler behaves when it is enabled. If set
487
- to ``true ``, the profiler collects data for all requests. If you want to only
488
- collect information on-demand, you can set the ``collect `` flag to ``false ``
489
- and activate the data collectors manually::
481
+ to ``true ``, the profiler collects data for all requests (unless you configure
482
+ otherwise, like a custom `matcher `_). If you want to only collect information
483
+ on-demand, you can set the ``collect `` flag to ``false `` and activate the data
484
+ collectors manually::
490
485
491
486
$profiler->enable();
492
487
@@ -496,67 +491,55 @@ only_exceptions
496
491
**type **: ``boolean `` **default **: ``false ``
497
492
498
493
When this is set to ``true ``, the profiler will only be enabled when an
499
- exception is thrown during the handling of the request. It becomes the service
500
- container parameter called ``profiler_listener.only_exceptions ``.
494
+ exception is thrown during the handling of the request.
501
495
502
496
only_master_requests
503
497
....................
504
498
505
499
**type **: ``boolean `` **default **: ``false ``
506
500
507
501
When this is set to ``true ``, the profiler will only be enabled on the master
508
- requests (and not on the subrequests). It becomes the service container
509
- parameter called ``profiler_listener.only_master_requests ``.
502
+ requests (and not on the subrequests).
510
503
511
504
dsn
512
505
...
513
506
514
507
**type **: ``string `` **default **: ``'file:%kernel.cache_dir%/profiler' ``
515
508
516
- The DSN where to save the profiling information. The supported drivers (part
517
- before the colon) are:
509
+ The DSN where to store the profiling information.
518
510
519
- * file
520
- * sqlite
521
- * mysql
522
- * mongodb
523
- * memcache
524
- * memcached
525
- * redis
511
+ .. seealso ::
526
512
527
- It becomes the service container parameter called ``profiler.storage.dsn ``.
513
+ See :doc: `/cookbook/profiler/storage ` for more information about the
514
+ profiler storage.
528
515
529
516
username
530
517
........
531
518
532
519
**type **: ``string `` **default **: ``'' ``
533
520
534
- When needed, the username for the profiling storage. It becomes the service
535
- container parameter called ``profiler.storage.username ``.
521
+ When needed, the username for the profiling storage.
536
522
537
523
password
538
524
........
539
525
540
526
**type **: ``string `` **default **: ``'' ``
541
527
542
- When needed, the password for the profiling storage. It becomes the service
543
- container parameter called ``profiler.storage.password ``.
528
+ When needed, the password for the profiling storage.
544
529
545
530
lifetime
546
531
........
547
532
548
533
**type **: ``integer `` **default **: ``86400 ``
549
534
550
535
The lifetime of the profiling storage in seconds. The data will be deleted when
551
- the lifetime is expired. It becomes the service container parameter called
552
- ``profiler.storage.lifetime ``.
553
-
536
+ the lifetime is expired.
554
537
555
538
matcher
556
539
.......
557
540
558
541
Matcher options are configured to dynamically enable the profiler. For
559
- instance, based on `ip `_ or :ref: `path <reference-profiler-matcher-path >`.
542
+ instance, based on the `ip `_ or :ref: `path <reference-profiler-matcher-path >`.
560
543
561
544
.. seealso ::
562
545
@@ -597,8 +580,6 @@ resource
597
580
The path the main routing resource (e.g. a YAML file) that contains the routes
598
581
and imports the router should load.
599
582
600
- It becomes the service container parameter called ``router.resource ``.
601
-
602
583
type
603
584
....
604
585
@@ -615,8 +596,6 @@ http_port
615
596
616
597
The port for normal http requests (this is used when matching the scheme).
617
598
618
- It becomes the service container parameter called ``router.resource ``.
619
-
620
599
https_port
621
600
..........
622
601
@@ -650,14 +629,6 @@ The value can be one of:
650
629
session
651
630
~~~~~~~
652
631
653
- storage_id
654
- ..........
655
-
656
- **type **: ``string `` **default **: ``'session.storage.native' ``
657
-
658
- The service id used for session storage. The ``session.storage `` service alias
659
- will be set to this service id.
660
-
661
632
handler_id
662
633
..........
663
634
@@ -669,23 +640,38 @@ will be set to this service id.
669
640
You can also set it to ``null ``, to default to the handler of your PHP
670
641
installation.
671
642
643
+ .. seealso ::
644
+
645
+ You can see an example of the usage of this in
646
+ :doc: `/cookbook/configuration/pdo_session_storage `.
647
+
648
+ storage_id
649
+ ..........
650
+
651
+ **type **: ``string `` **default **: ``'session.storage.native' ``
652
+
653
+ The service id used for session storage. The ``session.storage `` service alias
654
+ will be set to this service id. This class has to implement
655
+ :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ SessionStorageInterface `.
656
+
672
657
name
673
658
....
674
659
675
660
**type **: ``string `` **default **: ``null ``
676
661
677
- This specifies the name of the session cookie. By default it will use the cookie
678
- name which is defined in the ``php.ini `` with the ``session.name `` directive.
662
+ This specifies the name of the session cookie. By default it will use the
663
+ cookie name which is defined in the ``php.ini `` with the ``session.name ``
664
+ directive.
679
665
680
666
cookie_lifetime
681
667
...............
682
668
683
669
**type **: ``integer `` **default **: ``null ``
684
670
685
- This determines the lifetime of the session - in seconds. It will use ``null `` by
686
- default, which means ``session.cookie_lifetime `` value from ``php.ini `` will be used.
687
- Setting this value to ``0 `` means the cookie is valid for the length of the browser
688
- session.
671
+ This determines the lifetime of the session - in seconds. It will use ``null ``
672
+ by default, which means ``session.cookie_lifetime `` value from ``php.ini `` will
673
+ be used. Setting this value to ``0 `` means the cookie is valid for the length
674
+ of the browser session.
689
675
690
676
cookie_path
691
677
...........
@@ -910,8 +896,7 @@ hinclude_default_template
910
896
**type **: ``string `` **default **: ``null ``
911
897
912
898
Sets the content shown during the loading of the fragment or when JavaScript is
913
- disabled. This can be either a template name or the content itself. It becomes
914
- the service container parameter named ``fragment.renderer.hinclude.global_template ``.
899
+ disabled. This can be either a template name or the content itself.
915
900
916
901
.. seealso ::
917
902
@@ -1019,17 +1004,15 @@ cache
1019
1004
**type **: ``string ``
1020
1005
1021
1006
The path to the cache directory for templates. When this is not set, caching is
1022
- disabled. It becomes the service container parameter named
1023
- ``templating.loader.cache.path ``.
1007
+ disabled.
1024
1008
1025
1009
engines
1026
1010
.......
1027
1011
1028
1012
**type **: ``string[] `` / ``string `` **required **
1029
1013
1030
1014
The Templating Engine to use. This can either be a string (when only one engine
1031
- is configured) or an array of engines. It becomes the service container
1032
- parameter named ``templating.engines ``.
1015
+ is configured) or an array of engines.
1033
1016
1034
1017
At least one engine is required.
1035
1018
0 commit comments