Skip to content

Commit bb9a1e7

Browse files
committed
Some final fixes
1 parent b037d8c commit bb9a1e7

File tree

2 files changed

+66
-83
lines changed

2 files changed

+66
-83
lines changed

cookbook/profiler/storage.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ uses MySQL as the storage for the profiler with a lifetime of one hour:
5858
));
5959
6060
The :doc:`HttpKernel component </components/http_kernel/introduction>` currently
61-
supports the following profiler storage implementations:
61+
supports the following profiler storage drivers:
6262

63-
* :class:`Symfony\\Component\\HttpKernel\\Profiler\\FileProfilerStorage`
64-
* :class:`Symfony\\Component\\HttpKernel\\Profiler\\MemcachedProfilerStorage`
65-
* :class:`Symfony\\Component\\HttpKernel\\Profiler\\MemcacheProfilerStorage`
66-
* :class:`Symfony\\Component\\HttpKernel\\Profiler\\MongoDbProfilerStorage`
67-
* :class:`Symfony\\Component\\HttpKernel\\Profiler\\MysqlProfilerStorage`
68-
* :class:`Symfony\\Component\\HttpKernel\\Profiler\\RedisProfilerStorage`
69-
* :class:`Symfony\\Component\\HttpKernel\\Profiler\\SqliteProfilerStorage`
63+
* file
64+
* sqlite
65+
* mysql
66+
* mongodb
67+
* memcache
68+
* memcached
69+
* redis

reference/configuration/framework.rst

+58-75
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ trusted_proxies
135135

136136
**type**: ``array``
137137

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.
140139

141140
.. seealso::
142141

@@ -211,23 +210,22 @@ test
211210

212211
**type**: ``boolean``
213212

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
217216
``app/config/config_test.yml``).
218217

219218
.. seealso::
220219

221-
For more information, see :doc:`/book/testing`.
220+
For more information, see :doc:`/book/testing`.
222221

223222
default_locale
224223
~~~~~~~~~~~~~~
225224

226225
**type**: ``string`` **default**: ``'en'``
227226

228227
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
231229
:method:`Request::getDefaultLocale <Symfony\\Component\\HttpFoundation\\Request::getDefaultLocale>`
232230
method.
233231

@@ -252,14 +250,13 @@ might have been manipulated by an attacker.
252250
You can read "`HTTP Host header attacks`_" for more information about these
253251
kinds of attacks.
254252

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.
263260

264261
.. configuration-block::
265262

@@ -293,8 +290,8 @@ response.
293290
'trusted_hosts' => array('acme.com', 'acme.org'),
294291
));
295292
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.
298295

299296
In addition, you can also set the trusted hosts in the front controller using
300297
the ``Request::setTrustedHosts()`` method::
@@ -349,8 +346,7 @@ enabled
349346
**type**: ``boolean`` **default**: ``true``
350347

351348
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.
354350

355351
This option will automatically be set to ``true`` when one of the child
356352
settings is configured.
@@ -364,8 +360,7 @@ field_name
364360

365361
**type**: ``string`` **default**: ``'_token'``
366362

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.
369364

370365
esi
371366
~~~
@@ -444,8 +439,7 @@ path
444439
**type**: ``string`` **default**: ``'/_fragment'``
445440

446441
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.
449443

450444
profiler
451445
~~~~~~~~
@@ -469,8 +463,8 @@ and ``test`` environments.
469463
.. note::
470464

471465
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.
474468

475469
collect
476470
.......
@@ -484,9 +478,10 @@ collect
484478
**type**: ``boolean`` **default**: ``true``
485479

486480
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::
490485

491486
$profiler->enable();
492487

@@ -496,67 +491,55 @@ only_exceptions
496491
**type**: ``boolean`` **default**: ``false``
497492

498493
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.
501495

502496
only_master_requests
503497
....................
504498

505499
**type**: ``boolean`` **default**: ``false``
506500

507501
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).
510503

511504
dsn
512505
...
513506

514507
**type**: ``string`` **default**: ``'file:%kernel.cache_dir%/profiler'``
515508

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.
518510

519-
* file
520-
* sqlite
521-
* mysql
522-
* mongodb
523-
* memcache
524-
* memcached
525-
* redis
511+
.. seealso::
526512

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.
528515

529516
username
530517
........
531518

532519
**type**: ``string`` **default**: ``''``
533520

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.
536522

537523
password
538524
........
539525

540526
**type**: ``string`` **default**: ``''``
541527

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.
544529

545530
lifetime
546531
........
547532

548533
**type**: ``integer`` **default**: ``86400``
549534

550535
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.
554537

555538
matcher
556539
.......
557540

558541
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>`.
560543

561544
.. seealso::
562545

@@ -597,8 +580,6 @@ resource
597580
The path the main routing resource (e.g. a YAML file) that contains the routes
598581
and imports the router should load.
599582

600-
It becomes the service container parameter called ``router.resource``.
601-
602583
type
603584
....
604585

@@ -615,8 +596,6 @@ http_port
615596

616597
The port for normal http requests (this is used when matching the scheme).
617598

618-
It becomes the service container parameter called ``router.resource``.
619-
620599
https_port
621600
..........
622601

@@ -650,14 +629,6 @@ The value can be one of:
650629
session
651630
~~~~~~~
652631

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-
661632
handler_id
662633
..........
663634

@@ -669,23 +640,38 @@ will be set to this service id.
669640
You can also set it to ``null``, to default to the handler of your PHP
670641
installation.
671642

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+
672657
name
673658
....
674659

675660
**type**: ``string`` **default**: ``null``
676661

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.
679665

680666
cookie_lifetime
681667
...............
682668

683669
**type**: ``integer`` **default**: ``null``
684670

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.
689675

690676
cookie_path
691677
...........
@@ -910,8 +896,7 @@ hinclude_default_template
910896
**type**: ``string`` **default**: ``null``
911897

912898
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.
915900

916901
.. seealso::
917902

@@ -1019,17 +1004,15 @@ cache
10191004
**type**: ``string``
10201005

10211006
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.
10241008

10251009
engines
10261010
.......
10271011

10281012
**type**: ``string[]`` / ``string`` **required**
10291013

10301014
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.
10331016

10341017
At least one engine is required.
10351018

0 commit comments

Comments
 (0)