Skip to content

Commit 9b21ac0

Browse files
committed
Applied the easier comments
1 parent 90c9ac0 commit 9b21ac0

File tree

3 files changed

+35
-77
lines changed

3 files changed

+35
-77
lines changed

book/forms.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,13 +1584,17 @@ override the default error rendering for *all* fields, copy and customize the
15841584
.. index::
15851585
single: Forms; Global Theming
15861586

1587+
.. _book-forms-theming-global:
1588+
15871589
Global Form Theming
15881590
~~~~~~~~~~~~~~~~~~~
15891591

15901592
In the above example, you used the ``form_theme`` helper (in Twig) to "import"
15911593
the custom form fragments into *just* that form. You can also tell Symfony
15921594
to import form customizations across your entire project.
15931595

1596+
.. _book-forms-theming-twig:
1597+
15941598
Twig
15951599
....
15961600

book/routing.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,8 @@ URL Route Parameters
547547
.. index::
548548
single: Routing; Requirements
549549

550+
.. _book-routing-requirements:
551+
550552
Adding Requirements
551553
~~~~~~~~~~~~~~~~~~~
552554

reference/configuration/framework.rst

Lines changed: 29 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -142,40 +142,6 @@ service container parameter called ``kernel.trusted_proxies``.
142142

143143
For more details, see :doc:`/cookbook/request/load_balancer_reverse_proxy`.
144144

145-
.. versionadded:: 2.3
146-
CIDR notation support was introduced in Symfony 2.3, so you can whitelist whole
147-
subnets (e.g. ``10.0.0.0/8``, ``fc00::/7``).
148-
149-
.. configuration-block::
150-
151-
.. code-block:: yaml
152-
153-
# app/config/config.yml
154-
framework:
155-
trusted_proxies: [192.0.0.1, 10.0.0.0/8]
156-
157-
.. code-block:: xml
158-
159-
<!-- app/config/config.xml -->
160-
<?xml version="1.0" encoding="UTF-8" ?>
161-
<container xmlns="http://symfony.com/schema/dic/services"
162-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
163-
xmlns:framework="http://symfony.com/schema/dic/symfony"
164-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
165-
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
166-
167-
<framework:config trusted-proxies="192.0.0.1, 10.0.0.0/8">
168-
<!-- ... -->
169-
</framework:config>
170-
</container>
171-
172-
.. code-block:: php
173-
174-
// app/config/config.php
175-
$container->loadFromExtension('framework', array(
176-
'trusted_proxies' => array('192.0.0.1', '10.0.0.0/8'),
177-
));
178-
179145
ide
180146
~~~
181147

@@ -327,40 +293,8 @@ response.
327293
'trusted_hosts' => array('acme.com', 'acme.org'),
328294
));
329295
330-
Hosts can also be configured using regular expressions, which make it easier to
331-
respond to any subdomain:
332-
333-
.. configuration-block::
334-
335-
.. code-block:: yaml
336-
337-
# app/config/config.yml
338-
framework:
339-
trusted_hosts: ['.*\.?acme.com$', '.*\.?acme.org$']
340-
341-
.. code-block:: xml
342-
343-
<!-- app/config/config.xml -->
344-
<?xml version="1.0" encoding="UTF-8" ?>
345-
<container xmlns="http://symfony.com/schema/dic/services"
346-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
347-
xmlns:framework="http://symfony.com/schema/dic/symfony"
348-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
349-
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
350-
351-
<framework:config>
352-
<framework:trusted-host>.*\.?acme.com$</framework:trusted-host>
353-
<framework:trusted-host>.*\.?acme.org$</framework:trusted-host>
354-
<!-- ... -->
355-
</framework:config>
356-
</container>
357-
358-
.. code-block:: php
359-
360-
// app/config/config.php
361-
$container->loadFromExtension('framework', array(
362-
'trusted_hosts' => array('.*\.?acme.com$', '.*\.?acme.org$'),
363-
));
296+
Hosts can also be configured using regular expressions (e.g.
297+
``.*\.?acme.com$``), which make it easier to respond to any subdomain.
364298

365299
In addition, you can also set the trusted hosts in the front controller using
366300
the ``Request::setTrustedHosts()`` method::
@@ -605,7 +539,7 @@ password
605539

606540
**type**: ``string`` **default**: ``''``
607541

608-
When needed, the password for hte profiling storage. It becomes the service
542+
When needed, the password for the profiling storage. It becomes the service
609543
container parameter called ``profiler.storage.password``.
610544

611545
lifetime
@@ -621,6 +555,9 @@ the lifetime is expired. It becomes the service container parameter called
621555
matcher
622556
.......
623557

558+
Matcher options are configured to dynamically enable the profiler. For
559+
instance, based on `ip`_ or :ref:`path <reference-profiler-matcher-path>`.
560+
624561
.. seealso::
625562

626563
See :doc:`/cookbook/profiler/matchers` for more information about using
@@ -657,7 +594,8 @@ resource
657594

658595
**type**: ``string`` **required**
659596

660-
Specifies the path to the routes used by the default router.
597+
The path the main routing resource (e.g. a YAML file) that contains the routes
598+
and imports the router should load.
661599

662600
It becomes the service container parameter called ``router.resource``.
663601

@@ -691,8 +629,11 @@ strict_requirements
691629

692630
**type**: ``mixed`` **default**: ``true``
693631

694-
Determines the behaviour when a route matches, but the parameters do not match
695-
the specified requirements for that route. Can be one of:
632+
Determines the routing generator behaviour. When generating a route that has
633+
specific :ref:`requirements <book-routing-requirements>`, the generator can
634+
behave differently in case the used parameters do not meet these requirements.
635+
636+
The value can be one of:
696637

697638
``true``
698639
Throw an exception when the requirements are not met;
@@ -703,7 +644,7 @@ the specified requirements for that route. Can be one of:
703644
Disable checking the requirements (thus, match the route even when the
704645
requirements don't match).
705646

706-
``false`` is recommended in the development environment, while ``false`` or
647+
``true`` is recommended in the development environment, while ``false`` or
707648
``null`` might be preferred in production.
708649

709650
session
@@ -986,8 +927,12 @@ resources
986927

987928
**type**: ``string[]`` **default**: ``['FrameworkBundle:Form']``
988929

989-
A list of all resources for form theming in PHP. If you have custom global form
990-
themes in ``src/WebsiteBundle/Resources/views/Form``, you can configure this like:
930+
A list of all resources for form theming in PHP. This setting is not required
931+
if you're using the Twig format for your templates, in that case refer to
932+
:ref:`the form book chapter <book-forms-theming-twig>`.
933+
934+
Assume you have custom global form themes in
935+
``src/WebsiteBundle/Resources/views/Form``, you can configure this like:
991936

992937
.. configuration-block::
993938

@@ -1043,6 +988,10 @@ themes in ``src/WebsiteBundle/Resources/views/Form``, you can configure this lik
1043988
The default form templates from ``FrameworkBundle:Form`` will always be
1044989
included in the form resources.
1045990

991+
.. seealso::
992+
993+
See :ref:`book-forms-theming-global` for more information.
994+
1046995
.. _reference-templating-base-urls:
1047996

1048997
assets_base_urls
@@ -1090,7 +1039,9 @@ loaders
10901039
**type**: ``string[]``
10911040

10921041
An array (or a string when configuring just one loader) of service ids for
1093-
templating loaders.
1042+
templating loaders. Templating loaders are used to find and load templates from
1043+
a resource (e.g. a filesystem or database). Templating loaders must implement
1044+
:class:`Symfony\\Component\\Templating\\Loader\\LoaderInterface`.
10941045

10951046
packages
10961047
........
@@ -1264,7 +1215,8 @@ debug
12641215
Whether to enable debug mode for caching. If enabled, the cache will
12651216
automatically update when the original file is changed (both with code and
12661217
annotation changes). For performance reasons, it is recommended to disable
1267-
debug mode in production.
1218+
debug mode in production, which will happen automatically if you use the
1219+
default value.
12681220

12691221
.. _configuration-framework-serializer:
12701222

0 commit comments

Comments
 (0)