Skip to content

Commit f367fad

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Remove redundant parenthesis on attribute
2 parents 6f1d282 + fe023ab commit f367fad

9 files changed

+11
-11
lines changed

components/http_kernel.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ return a ``Response``.
398398

399399
There is a default listener inside the Symfony Framework for the ``kernel.view``
400400
event. If your controller action returns an array, and you apply the
401-
:ref:`#[Template()] attribute <templates-template-attribute>` to that
401+
:ref:`#[Template] attribute <templates-template-attribute>` to that
402402
controller action, then this listener renders a template, passes the array
403403
you returned from your controller to that template, and creates a ``Response``
404404
containing the returned content from that template.

controller.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ Make sure to install `phpstan/phpdoc-parser`_ and `phpdocumentor/type-resolver`_
539539
if you want to map a nested array of specific DTOs::
540540

541541
public function dashboard(
542-
#[MapRequestPayload()] EmployeesDto $employeesDto
542+
#[MapRequestPayload] EmployeesDto $employeesDto
543543
): Response
544544
{
545545
// ...

http_cache.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ Additionally, most cache-related HTTP headers can be set via the single
327327

328328
.. tip::
329329

330-
All these options are also available when using the ``#[Cache()]`` attribute.
330+
All these options are also available when using the ``#[Cache]`` attribute.
331331

332332
Cache Invalidation
333333
------------------

http_cache/cache_vary.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ trigger a different representation of the requested resource:
2828
resource based on the URI and the value of the ``Accept-Encoding`` and
2929
``User-Agent`` request header.
3030

31-
Set the ``Vary`` header via the ``Response`` object methods or the ``#[Cache()]``
31+
Set the ``Vary`` header via the ``Response`` object methods or the ``#[Cache]``
3232
attribute::
3333

3434
.. configuration-block::

http_cache/expiration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ or disadvantage to either.
6161

6262
According to the HTTP specification, "the ``Expires`` header field gives
6363
the date/time after which the response is considered stale." The ``Expires``
64-
header can be set with the ``expires`` option of the ``#[Cache()]`` attribute or
64+
header can be set with the ``expires`` option of the ``#[Cache]`` attribute or
6565
the ``setExpires()`` ``Response`` method::
6666

6767
.. configuration-block::

security.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2470,7 +2470,7 @@ will happen:
24702470
.. _security-securing-controller-annotations:
24712471
.. _security-securing-controller-attributes:
24722472

2473-
Another way to secure one or more controller actions is to use the ``#[IsGranted()]`` attribute.
2473+
Another way to secure one or more controller actions is to use the ``#[IsGranted]`` attribute.
24742474
In the following example, all controller actions will require the
24752475
``ROLE_ADMIN`` permission, except for ``adminDashboard()``, which will require
24762476
the ``ROLE_SUPER_ADMIN`` permission:

security/expressions.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Using Expressions in Security Access Controls
77
the :doc:`Voter System </security/voters>`.
88

99
In addition to security roles like ``ROLE_ADMIN``, the ``isGranted()`` method
10-
and ``#[IsGranted()]`` attribute also accept an
10+
and ``#[IsGranted]`` attribute also accept an
1111
:class:`Symfony\\Component\\ExpressionLanguage\\Expression` object:
1212

1313
.. configuration-block::
@@ -138,7 +138,7 @@ Additionally, you have access to a number of functions inside the expression:
138138
true if the user has actually logged in during this session (i.e. is
139139
full-fledged).
140140

141-
In case of the ``#[IsGranted()]`` attribute, the subject can also be an
141+
In case of the ``#[IsGranted]`` attribute, the subject can also be an
142142
:class:`Symfony\\Component\\ExpressionLanguage\\Expression` object::
143143

144144
// src/Controller/MyController.php

security/voters.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ code like this:
121121
}
122122
}
123123
124-
The ``#[IsGranted()]`` attribute or ``denyAccessUnlessGranted()`` method (and also the ``isGranted()`` method)
124+
The ``#[IsGranted]`` attribute or ``denyAccessUnlessGranted()`` method (and also the ``isGranted()`` method)
125125
calls out to the "voter" system. Right now, no voters will vote on whether or not
126126
the user can "view" or "edit" a ``Post``. But you can create your *own* voter that
127127
decides this using whatever logic you want.

templates.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ use the ``render()`` method of the ``twig`` service.
566566

567567
.. _templates-template-attribute:
568568

569-
Another option is to use the ``#[Template()]`` attribute on the controller method
569+
Another option is to use the ``#[Template]`` attribute on the controller method
570570
to define the template to render::
571571

572572
// src/Controller/ProductController.php
@@ -583,7 +583,7 @@ to define the template to render::
583583
{
584584
// ...
585585

586-
// when using the #[Template()] attribute, you only need to return
586+
// when using the #[Template] attribute, you only need to return
587587
// an array with the parameters to pass to the template (the attribute
588588
// is the one which will create and return the Response object).
589589
return [

0 commit comments

Comments
 (0)