File tree 16 files changed +24
-20
lines changed
16 files changed +24
-20
lines changed Original file line number Diff line number Diff line change 34
34
short_array_syntax : ~
35
35
space_between_label_and_link_in_doc : ~
36
36
space_between_label_and_link_in_ref : ~
37
+ string_replacement : ~
37
38
typo : ~
38
39
unused_links : ~
39
40
use_deprecated_directive_instead_of_versionadded : ~
Original file line number Diff line number Diff line change @@ -623,7 +623,7 @@ arguments to the filter:
623
623
624
624
.. code-block :: html+twig
625
625
626
- {% apply inline_css(source('@css /email.css')) %}
626
+ {% apply inline_css(source('@styles /email.css')) %}
627
627
<h1>Welcome {{ username }}!</h1>
628
628
{# ... #}
629
629
{% endapply %}
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ handler is registered. The ``HandleTrait`` can be used in any class that has a
62
62
}
63
63
64
64
// Creating such a method is optional, but allows type-hinting the result
65
- private function query(ListItemsQuery $query): ListItemsResult
65
+ private function query(ListItemsQuery $query): ListItemsQueryResult
66
66
{
67
67
return $this->handle($query);
68
68
}
Original file line number Diff line number Diff line change @@ -860,7 +860,7 @@ outgoing network interface.
860
860
buffer
861
861
......
862
862
863
- **type **: ``bool `` | ``Closure ``
863
+ **type **: ``boolean `` | ``Closure ``
864
864
865
865
Buffering the response means that you can access its content multiple times
866
866
without performing the request again. Buffering is enabled by default when the
@@ -3045,7 +3045,7 @@ Name of the workflow you want to create.
3045
3045
audit_trail
3046
3046
"""""""""""
3047
3047
3048
- **type **: ``bool ``
3048
+ **type **: ``boolean ``
3049
3049
3050
3050
If set to ``true ``, the :class: `Symfony\\ Component\\ Workflow\\ EventListener\\ AuditTrailListener `
3051
3051
will be enabled.
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ no specific character is passed as argument to the ``number_format`` filter.
294
294
optimizations
295
295
~~~~~~~~~~~~~
296
296
297
- **type **: ``int `` **default **: ``-1 ``
297
+ **type **: ``integer `` **default **: ``-1 ``
298
298
299
299
Twig includes an extension called ``optimizer `` which is enabled by default in
300
300
Symfony applications. This extension analyzes the templates to optimize them
@@ -358,6 +358,8 @@ the directory defined in the :ref:`default_path option <config-twig-default-path
358
358
359
359
Read more about :ref: `template directories and namespaces <templates-namespaces >`.
360
360
361
+ .. _config-twig-strict-variables :
362
+
361
363
strict_variables
362
364
~~~~~~~~~~~~~~~~
363
365
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ has to be satisfied in order for the validation to succeed.
163
163
includeInternalMessages
164
164
~~~~~~~~~~~~~~~~~~~~~~~
165
165
166
- **type **: ``bool `` **default **: ``true ``
166
+ **type **: ``boolean `` **default **: ``true ``
167
167
168
168
If set to ``true ``, the message that is shown if the validation fails,
169
169
will include the list of messages for the internal constraints. See option
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ The following constraints ensure that:
39
39
40
40
class Item
41
41
{
42
-
43
42
/**
44
43
* @Assert\DivisibleBy(0.25)
45
44
*/
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ Parameter Description
122
122
``requireTld ``
123
123
~~~~~~~~~~~~~~
124
124
125
- **type **: ``bool `` **default **: ``true ``
125
+ **type **: ``boolean `` **default **: ``true ``
126
126
127
127
By default, hostnames are considered valid only when they are fully qualified
128
128
and include their TLDs (top-level domain names). For instance, ``example.com ``
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ on an object that will contain an ISBN.
37
37
/**
38
38
* @Assert\Isbn(
39
39
* type = "isbn10",
40
- * message = "This value is not valid."
40
+ * message = "This value is not valid."
41
41
* )
42
42
*/
43
43
protected $isbn;
@@ -51,7 +51,7 @@ on an object that will contain an ISBN.
51
51
isbn :
52
52
- Isbn :
53
53
type : isbn10
54
- message : This value is not valid.
54
+ message : This value is not valid.
55
55
56
56
.. code-block :: xml
57
57
@@ -65,7 +65,7 @@ on an object that will contain an ISBN.
65
65
<property name =" isbn" >
66
66
<constraint name =" Isbn" >
67
67
<option name =" type" >isbn10</option >
68
- <option name =" message" >This value is not valid.</option >
68
+ <option name =" message" >This value is not valid.</option >
69
69
</constraint >
70
70
</property >
71
71
</class >
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ Options
85
85
allowNull
86
86
~~~~~~~~~
87
87
88
- **type **: ``bool `` **default **: ``false ``
88
+ **type **: ``boolean `` **default **: ``false ``
89
89
90
90
If set to ``true ``, ``null `` values are considered valid and won't trigger a
91
91
constraint violation.
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ The ``groups`` option is not available for this constraint.
146
146
``traverse ``
147
147
~~~~~~~~~~~~
148
148
149
- **type **: ``bool `` **default **: ``true ``
149
+ **type **: ``boolean `` **default **: ``true ``
150
150
151
151
Instances of ``\Traversable `` are traversed by default, use this option to
152
152
disable validating:
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ Field Options
49
49
html5
50
50
~~~~~
51
51
52
- **type **: ``bool `` **default **: ``false ``
52
+ **type **: ``boolean `` **default **: ``false ``
53
53
54
54
.. versionadded :: 5.1
55
55
Original file line number Diff line number Diff line change 1
1
help_html
2
2
~~~~~~~~~
3
3
4
- **type**: ``bool `` **default **: ``false ``
4
+ **type **: ``boolean `` **default**: ``false``
5
5
6
6
By default, the contents of the ``help`` option are escaped before rendering
7
7
them in the template. Set this option to ``true`` to not escape them, which is
Original file line number Diff line number Diff line change 1
1
``label_html``
2
2
~~~~~~~~~~~~~~
3
3
4
- **type**: ``bool `` **default **: ``false ``
4
+ **type**: ``boolean `` **default **: ``false ``
5
5
6
6
.. versionadded:: 5.1
7
7
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ This command also creates the following configuration file:
47
47
48
48
# config/routes/annotations.yaml
49
49
controllers :
50
- resource : ' ../../src/Controller/'
50
+ resource : ../../src/Controller/
51
51
type : annotation
52
52
53
53
kernel :
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ Template Naming
118
118
119
119
Symfony recommends the following for template names:
120
120
121
- * Use `snake case `_ for filenames and directories (e.g. ``blog_posts.twig ``,
122
- ``admin/default_theme/blog/index.twig ``, etc.);
121
+ * Use `snake case `_ for filenames and directories (e.g. ``blog_posts.html. twig ``,
122
+ ``admin/default_theme/blog/index.html. twig ``, etc.);
123
123
* Define two extensions for filenames (e.g. ``index.html.twig `` or
124
124
``blog_posts.xml.twig ``) being the first extension (``html ``, ``xml ``, etc.)
125
125
the final format that the template will generate.
@@ -164,7 +164,9 @@ in the following order:
164
164
#. ``$foo->getBar() `` (object and *getter * method);
165
165
#. ``$foo->isBar() `` (object and *isser * method);
166
166
#. ``$foo->hasBar() `` (object and *hasser * method);
167
- #. If none of the above exists, use ``null ``.
167
+ #. If none of the above exists, use ``null `` (or throw a ``Twig\Error\RuntimeError ``
168
+ exception if the :ref: `strict_variables <config-twig-strict-variables >`
169
+ option is enabled).
168
170
169
171
This allows to evolve your application code without having to change the
170
172
template code (you can start with array variables for the application proof of
You can’t perform that action at this time.
0 commit comments