Skip to content

Commit 0eb2531

Browse files
committed
Merge pull request #3174 from bicpi/another_fixing_typos_formatting_logic_collection
Another collection of fixes: Typos, Formatting, Logic, Links
2 parents 2811ac0 + fd0df44 commit 0eb2531

File tree

20 files changed

+49
-39
lines changed

20 files changed

+49
-39
lines changed

components/dependency_injection/workflow.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Compiler passes to allow Interaction between Bundles
6464
:ref:`Compiler passes <components-dependency-injection-compiler-passes>` are
6565
used to allow interaction between different bundles as they cannot affect
6666
each other's configuration in the extension classes. One of the main uses is
67-
to process tagged services, allowing bundles to register services to picked
67+
to process tagged services, allowing bundles to register services to be picked
6868
up by other bundles, such as Monolog loggers, Twig extensions and Data Collectors
6969
for the Web Profiler. Compiler passes are usually placed in the bundle's
7070
``DependencyInjection/Compiler`` directory.

components/http_foundation/introduction.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Sending the response to the client is then as simple as calling
322322
Setting Cookies
323323
~~~~~~~~~~~~~~~
324324

325-
The response cookies can be manipulated though the ``headers`` public
325+
The response cookies can be manipulated through the ``headers`` public
326326
attribute::
327327

328328
use Symfony\Component\HttpFoundation\Cookie;

components/security/authorization.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ An authorization decision will always be based on a few things:
2626
Each attribute stands for a certain right the user should have, e.g.
2727
``ROLE_ADMIN`` to make sure the user is an administrator.
2828
* An object (optional)
29-
Any object on which for which access control needs to be checked, like
29+
Any object for which access control needs to be checked, like
3030
an article or a comment object.
3131

3232
.. _components-security-access-decision-manager:

components/security/firewall.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ Flow: Firewall, Authentication, Authorization
127127
Hopefully you can now see a little bit about how the "flow" of the security
128128
context works:
129129

130-
#. the Firewall is registered as a listener on the ``kernel.request`` event;
131-
#. at the beginning of the request, the Firewall checks the firewall map
130+
#. The Firewall is registered as a listener on the ``kernel.request`` event;
131+
#. At the beginning of the request, the Firewall checks the firewall map
132132
to see if any firewall should be active for this URL;
133-
#. If a firewall is found in the map for this URL, its listeners are notified
134-
#. each listener checks to see if the current request contains any authentication
133+
#. If a firewall is found in the map for this URL, its listeners are notified;
134+
#. Each listener checks to see if the current request contains any authentication
135135
information - a listener may (a) authenticate a user, (b) throw an
136136
``AuthenticationException``, or (c) do nothing (because there is no
137137
authentication information on the request);

cookbook/controller/service.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ the route ``_controller`` value:
112112
113113
# app/config/routing.yml
114114
hello:
115-
pattern: /hello
115+
path: /hello
116116
defaults: { _controller: acme.hello.controller:indexAction }
117117
118118
.. code-block:: xml
119119
120120
<!-- app/config/routing.xml -->
121-
<route id="hello" pattern="/hello">
121+
<route id="hello" path="/hello">
122122
<default key="_controller">acme.hello.controller:indexAction</default>
123123
</route>
124124

cookbook/doctrine/registration_form.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,12 @@ Next, update your routes. If you're placing your routes inside your bundle
310310
311311
# src/Acme/AccountBundle/Resources/config/routing.yml
312312
account_register:
313-
pattern: /register
314-
defaults: { _controller: AcmeAccountBundle:Account:register }
313+
path: /register
314+
defaults: { _controller: AcmeAccountBundle:Account:register }
315315
316316
account_create:
317-
pattern: /register/create
318-
defaults: { _controller: AcmeAccountBundle:Account:create }
317+
path: /register/create
318+
defaults: { _controller: AcmeAccountBundle:Account:create }
319319
320320
.. code-block:: xml
321321

reference/configuration/doctrine.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,6 @@ which is the first one defined or the one configured via the
405405
``default_connection`` parameter.
406406

407407
Each connection is also accessible via the ``doctrine.dbal.[name]_connection``
408-
service where ``[name]`` if the name of the connection.
408+
service where ``[name]`` is the name of the connection.
409409

410410
.. _DBAL documentation: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html

reference/configuration/swiftmailer.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ type
100100

101101
**type**: ``string`` **default**: ``file``
102102

103-
The method used to store spooled messages. Currently only ``file`` is supported.
104-
However, a custom spool should be possible by creating a service called
103+
The method used to store spooled messages. Valid values are ``memory`` and
104+
``file``. A custom spool should be possible by creating a service called
105105
``swiftmailer.spool.myspool`` and setting this value to ``myspool``.
106106

107107
path

reference/constraints/False.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ method returns **false**:
4545
Acme\BlogBundle\Entity\Author
4646
getters:
4747
stateInvalid:
48-
- "False":
48+
- 'False':
4949
message: You've entered an invalid state.
5050
5151
.. code-block:: php-annotations
@@ -103,8 +103,8 @@ method returns **false**:
103103
104104
.. caution::
105105

106-
When using YAML, be sure to surround ``False`` with quotes (``"False"``)
107-
or else YAML will convert this into a Boolean value.
106+
When using YAML, be sure to surround ``False`` with quotes (``'False'``)
107+
or else YAML will convert this into a ``false`` Boolean value.
108108

109109
Options
110110
-------

reference/constraints/File.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ If set, the validator will check that the mime type of the underlying file
177177
is equal to the given mime type (if a string) or exists in the collection
178178
of given mime types (if an array).
179179

180-
You can find a list of existing mime types on the `IANA website`_
180+
You can find a list of existing mime types on the `IANA website`_.
181181

182182
maxSizeMessage
183183
~~~~~~~~~~~~~~

reference/constraints/Length.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ is used.
134134
minMessage
135135
~~~~~~~~~~
136136

137-
**type**: ``string`` **default**: ``This value is too short. It should have {{ limit }} characters or more.``.
137+
**type**: ``string`` **default**: ``This value is too short. It should have {{ limit }} characters or more.``
138138

139139
The message that will be shown if the underlying value's length is less than the `min`_ option.
140140

141141
maxMessage
142142
~~~~~~~~~~
143143

144-
**type**: ``string`` **default**: ``This value is too long. It should have {{ limit }} characters or less.``.
144+
**type**: ``string`` **default**: ``This value is too long. It should have {{ limit }} characters or less.``
145145

146146
The message that will be shown if the underlying value's length is more than the `max`_ option.
147147

reference/constraints/Null.rst

+5
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ of an ``Author`` class exactly equal to ``null``, you could do the following:
7777
}
7878
}
7979
80+
.. caution::
81+
82+
When using YAML, be sure to surround ``Null`` with quotes (``'Null'``)
83+
or else YAML will convert this into a ``null`` value.
84+
8085
Options
8186
-------
8287

reference/constraints/Regex.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ will convert the pattern given in the `pattern`_ option into an HTML5 compatible
188188
pattern. This means that the delimiters are removed (e.g. ``/[a-z]+/`` becomes ``[a-z]+``).
189189

190190
However, there are some other incompatibilities between both patterns which
191-
cannot be fixed by the constraint. For instance, the html5 pattern attribute
191+
cannot be fixed by the constraint. For instance, the HTML5 ``pattern`` attribute
192192
does not support flags. If you have a pattern like ``/[a-z]+/i`` you need to
193-
specify the html5 compatible pattern in the ``htmlPattern`` option:
193+
specify the HTML5 compatible pattern in the ``htmlPattern`` option:
194194

195195
.. configuration-block::
196196

reference/constraints/True.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Then you can constrain this method with ``True``.
5050
Acme\BlogBundle\Entity\Author:
5151
getters:
5252
tokenValid:
53-
- "True": { message: "The token is invalid." }
53+
- 'True': { message: "The token is invalid." }
5454
5555
.. code-block:: php-annotations
5656
@@ -116,6 +116,11 @@ Then you can constrain this method with ``True``.
116116
117117
If the ``isTokenValid()`` returns false, the validation will fail.
118118

119+
.. caution::
120+
121+
When using YAML, be sure to surround ``True`` with quotes (``'True'``)
122+
or else YAML will convert this into a ``true`` Boolean value.
123+
119124
Options
120125
-------
121126

reference/constraints/UniqueEntity.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ errorPath
167167
.. versionadded:: 2.1
168168
The ``errorPath`` option was added in Symfony 2.1.
169169

170-
If the entity violates constraint the error message is bound to the first
171-
field in `fields`_. If there are more than one fields, you may want to map
170+
If the entity violates the constraint the error message is bound to the first
171+
field in `fields`_. If there is more than one field, you may want to map
172172
the error message to another field.
173173

174174
Consider this example:

reference/forms/types/collection.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ you need is the JavaScript:
202202
is automatically available on the ``data-prototype`` attribute of the
203203
element (e.g. ``div`` or ``table``) that surrounds your collection. The
204204
only difference is that the entire "form row" is rendered for you, meaning
205-
you wouldn't have to wrap it in any container element as was done
205+
you wouldn't have to wrap it in any container element as it was done
206206
above.
207207

208208
Field Options

reference/forms/types/integer.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This field has different options on how to handle input values that aren't
1313
integers. By default, all non-integer values (e.g. 6.78) will round down (e.g. 6).
1414

1515
+-------------+-----------------------------------------------------------------------+
16-
| Rendered as | ``input`` ``text`` field |
16+
| Rendered as | ``input`` ``number`` field |
1717
+-------------+-----------------------------------------------------------------------+
1818
| Options | - `rounding_mode`_ |
1919
| | - `precision`_ |

reference/forms/types/options/attr.rst.inc

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ attr
33

44
**type**: array **default**: Empty array
55

6-
If you want to add extra attributes to HTML field representation
7-
you can use ``attr`` option. It's an associative array with HTML attribute
8-
as a key. This can be useful when you need to set a custom class for some widget::
6+
If you want to add extra attributes to an HTML field representation
7+
you can use the ``attr`` option. It's an associative array with HTML attributes
8+
as keys. This can be useful when you need to set a custom class for some widget::
99

1010
$builder->add('body', 'textarea', array(
1111
'attr' => array('class' => 'tinymce'),

reference/forms/types/options/date_widget.rst.inc

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ widget
55

66
The basic way in which this field should be rendered. Can be one of the following:
77

8-
* ``choice``: renders three select inputs. The order of the selects is defined
8+
* ``choice``: renders three select inputs. The order of the selects is defined
99
in the `format`_ option.
1010

11-
* ``text``: renders a three field input of type text (month, day, year).
11+
* ``text``: renders a three field input of type ``text`` (month, day, year).
1212

13-
* ``single_text``: renders a single input of type date (text in Symfony 2.0). User's
14-
input is validated based on the `format`_ option.
13+
* ``single_text``: renders a single input of type ``date`` (``text`` in Symfony 2.0).
14+
User's input is validated based on the `format`_ option.

reference/forms/types/options/error_mapping.rst.inc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
.. versionadded:: 2.1
2-
The ``error_mapping`` option is new to Symfony 2.1.
3-
41
error_mapping
52
~~~~~~~~~~~~~
63

74
**type**: ``array`` **default**: ``empty``
85

6+
.. versionadded:: 2.1
7+
The ``error_mapping`` option is new to Symfony 2.1.
8+
99
This option allows you to modify the target of a validation error.
1010

1111
Imagine you have a custom method named ``matchingCityAndZipCode`` that validates

0 commit comments

Comments
 (0)