Skip to content

Commit c545e17

Browse files
committed
Fix some mistakes
1 parent 07063b6 commit c545e17

18 files changed

+38
-40
lines changed

best_practices/security.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ be reused in other parts of the application. Imagine that you want to add
161161
a link in a template that will only be seen by authors. Right now you'll
162162
need to repeat the expression code using Twig syntax:
163163

164-
.. code-block:: html+jinja
164+
.. code-block:: html+twig
165165

166166
{% if app.user and app.user.email == post.authorEmail %}
167167
<a href=""> ... </a>
@@ -203,7 +203,7 @@ Now you can reuse this method both in the template and in the security expressio
203203
// ...
204204
}
205205

206-
.. code-block:: html+jinja
206+
.. code-block:: html+twig
207207

208208
{% if post.isAuthor(app.user) %}
209209
<a href=""> ... </a>

components/http_kernel.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ For general information on adding listeners to the events below, see
143143
As of 3.1 the :class:`Symfony\\Component\\HttpKernel\\HttpKernel` accepts a
144144
fourth argument, which must be an instance of
145145
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface`.
146-
In 4.0 this argument will become mandatory.
147146

148147
.. seealso::
149148

components/serializer.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ There are several types of normalizers available:
578578
calling the constructor during the denormalization process.
579579

580580
Objects are normalized to a map of property names and values (names are
581-
generated removing the ``get``, ``set``, ``has`` or ``remove`` prefix from
581+
generated removing the ``get``, ``set``, ``has``, ``is`` or ``remove`` prefix from
582582
the method name and lowercasing the first letter; e.g. ``getFirstName()`` ->
583583
``firstName``).
584584

@@ -936,9 +936,7 @@ Use the special ``#`` key to define the data of a node::
936936
// is encoded as follows:
937937
// <?xml version="1.0"?>
938938
// <response>
939-
// <foo bar="value">
940-
// baz
941-
// </foo>
939+
// <foo bar="value">baz</foo>
942940
// </response>
943941

944942
Context

doctrine/lifecycle_callbacks.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ How to Work with Lifecycle Callbacks
66

77
Sometimes, you need to perform an action right before or after an entity
88
is inserted, updated, or deleted. These types of actions are known as "lifecycle"
9-
callbacks, as they're callback methods that you need to execute during different
9+
callbacks, as they're callback functions that you need to execute during different
1010
stages of the lifecycle of an entity (e.g. the entity is inserted, updated,
1111
deleted, etc).
1212

email.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ To keep things decoupled, the email body has been stored in a template and
138138
rendered with the ``renderView()`` method. The ``registration.html.twig``
139139
template might look something like this:
140140

141-
.. code-block:: html+jinja
141+
.. code-block:: html+twig
142142

143143
{# app/Resources/views/Emails/registration.html.twig #}
144144
<h3>You did it! You registered!</h3>

form/create_custom_field_type.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ link for details), create a ``shipping_widget`` block to handle this:
141141

142142
You can further customize the template used to render each children of the
143143
choice type. The block to override in that case is named "block name" +
144-
``_entry`` + "element name" (``label``, ``errors`` or ``widget``) (e.g. to
144+
``_entry_`` + "element name" (``label``, ``errors`` or ``widget``) (e.g. to
145145
customize the labels of the children of the Shipping widget you'd need to
146146
define ``{% block shipping_entry_label %} ... {% endblock %}``).
147147

form/form_customization.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ above templates would render:
4242
<li>This field is required</li>
4343
</ul>
4444
<input type="number" id="form_age" name="form[age]" />
45+
<p id="form_age_help" class="help-text">One help note.</p>
4546
</div>
4647

4748
To quickly prototype and test a form, you can render the entire form with
@@ -720,7 +721,7 @@ Customizing the "Form Row"
720721
~~~~~~~~~~~~~~~~~~~~~~~~~~
721722

722723
When you can manage it, the easiest way to render a form field is via the
723-
``form_row()`` function, which renders the label, errors and HTML widget of
724+
``form_row()`` function, which renders the label, errors, help and HTML widget of
724725
a field. To customize the markup used for rendering *all* form field rows,
725726
override the ``form_row`` fragment. For example, suppose you want to add a
726727
class to the ``div`` element around each row:

form/rendering.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ output can be customized on many different levels.
3939

4040
.. code-block:: twig
4141
42-
{{ form.vars.value.task }}
42+
{{ form.task.vars.value }}
4343
4444
.. index::
4545
single: Forms; Rendering each field by hand

reference/configuration/framework.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ ships with multiple adapters: ``cache.adapter.apcu``, ``cache.adapter.doctrine``
19361936
given the adapter they are based on. Internally, a pool wraps the definition
19371937
of an adapter.
19381938

1939-
.. _reference-cache-systen:
1939+
.. _reference-cache-system:
19401940

19411941
system
19421942
......

reference/constraints/Callback.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@ on your object. If you're using validation with forms, this means that you
77
can make these custom errors display next to a specific field, instead of
88
simply at the top of your form.
99

10-
This process works by specifying one or more *callback* methods, each of
11-
which will be called during the validation process. Each of those methods
10+
This process works by specifying one or more *callback* functions, each of
11+
which will be called during the validation process. Each of those functions
1212
can do anything, including creating and assigning validation errors.
1313

1414
.. note::
1515

16-
A callback method itself doesn't *fail* or return any value. Instead,
17-
as you'll see in the example, a callback method has the ability to directly
16+
A callback function itself doesn't *fail* or return any value. Instead,
17+
as you'll see in the example, a callback function has the ability to directly
1818
add validator "violations".
1919

20-
+----------------+------------------------------------------------------------------------+
21-
| Applies to | :ref:`class <validation-class-target>` |
22-
+----------------+------------------------------------------------------------------------+
23-
| Options | - :ref:`callback <callback-option>` |
24-
| | - `payload`_ |
25-
+----------------+------------------------------------------------------------------------+
26-
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Callback` |
27-
+----------------+------------------------------------------------------------------------+
28-
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CallbackValidator` |
29-
+----------------+------------------------------------------------------------------------+
20+
+----------------+-----------------------------------------------------------------------------------------------+
21+
| Applies to | :ref:`class <validation-class-target>` or :ref:`property/method <validation-property-target>` |
22+
+----------------+-----------------------------------------------------------------------------------------------+
23+
| Options | - :ref:`callback <callback-option>` |
24+
| | - `payload`_ |
25+
+----------------+-----------------------------------------------------------------------------------------------+
26+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Callback` |
27+
+----------------+-----------------------------------------------------------------------------------------------+
28+
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CallbackValidator` |
29+
+----------------+-----------------------------------------------------------------------------------------------+
3030

3131
Configuration
3232
-------------
@@ -88,10 +88,10 @@ Configuration
8888
}
8989
}
9090
91-
The Callback Method
92-
-------------------
91+
The Callback Function
92+
---------------------
9393

94-
The callback method is passed a special ``ExecutionContextInterface`` object.
94+
The callback function is passed a special ``ExecutionContextInterface`` object.
9595
You can set "violations" directly on this object and determine to which
9696
field those errors should be attributed::
9797

@@ -260,7 +260,7 @@ callback
260260
**type**: ``string``, ``array`` or ``Closure`` [:ref:`default option <validation-default-option>`]
261261

262262
The callback option accepts three different formats for specifying the
263-
callback method:
263+
callback function:
264264

265265
* A **string** containing the name of a concrete or static method;
266266

0 commit comments

Comments
 (0)