Skip to content

Commit 4d4a1ce

Browse files
Apply suggestions
1 parent b6e4367 commit 4d4a1ce

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

quick_tour/the_architecture.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Twig Extension & Autoconfiguration
158158

159159
Thanks to Symfony's service handling, you can *extend* Symfony in many ways, like
160160
by creating an event subscriber or a security voter for complex authorization
161-
rules. Let's add a new filter to Twig called ``greet``. How? Create a simple class
161+
rules. Let's add a new filter to Twig called ``greet``. How? Create a class
162162
with your logic::
163163

164164
// src/Twig/GreetExtension.php

templates.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,7 @@ If you want to create a function instead of a filter, use the
16021602

16031603
.. versionadded:: 7.3
16041604

1605-
Support for the ``#[AsTwigFilter]`` and ``#[AsTwigFunction]`` attributes was introduced in Symfony 7.3.
1605+
Support for the ``#[AsTwigFilter]``, ``#[AsTwigFunction]`` and ``#[AsTwigTest]`` attributes was introduced in Symfony 7.3.
16061606
Previously, you had to extend the ``AbstractExtension`` class, and override the
16071607
``getFilters()`` and ``getFunctions()`` methods.
16081608

@@ -1635,9 +1635,8 @@ Creating Lazy-Loaded Twig Extensions
16351635

16361636
When using attributes to extend Twig, the services are initialized only when
16371637
the functions or filters are used to render the template. But in case you use the
1638-
classic approach by extending the ``AbstractExtension`` class, Twig initialize all extensions before
1639-
rendering rendering any template, even if the template doesn't use an
1640-
extension.
1638+
classic approach by extending the ``AbstractExtension`` class, Twig initializes all the extensions before
1639+
rendering any template, even if the extension is not used in the template.
16411640

16421641
If extensions don't define dependencies (i.e. if you don't inject services in
16431642
them) performance is not affected. However, if extensions define lots of complex

0 commit comments

Comments
 (0)