-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[TwigBundle] Enable #[AsTwigFilter]
, #[AsTwigFunction]
and #[AsTwigTest]
#20879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I have no clue why the CI fails to build the docs, I can build it properly on my end 😞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a few comments. I find it hard to juggle the old and new ways of doing things in the same doc without making it too complex to understand; but it looks fine to me the way it is.
Thanks for the comment GromNan, it's very appreciated especially since I'm still new to the doc repository. I'm slowly starting to get the hang of how to write it 🎉. I'll apply your suggestions tomorrow 😄 |
#[AsTwigTest]
#[AsTwigFilter]
, #[AsTwigFunction]
and #[AsTwigTest]
@@ -123,6 +123,8 @@ Twig | |||
~~~~ | |||
|
|||
* :ref:`Template <templates-template-attribute>` | |||
* :ref:`AsTwigFilter <templates-twig-filter-attribute>` | |||
* :ref:`AsTwigFunction <templates-twig-function-attribute>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about also adding something for the #[AsTwigTest]
attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added #[AsTwigTest]
to the list, but just as text, without any link to it. I think this is rare enough to not explain it and just mention that it exists. Thanks.
@@ -197,8 +190,8 @@ After creating just *one* file, you can use this immediately: | |||
{# templates/default/index.html.twig #} | |||
{# Will print something like "Hey Symfony!" #} | |||
<h1>{{ name|greet }}</h1> | |||
|
|||
How does this work? Symfony notices that your class extends ``AbstractExtension`` | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the added spaces should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did that while merging. Thanks.
4d4a1ce
to
15849ea
Compare
@RisingSunLight42 thanks a lot for this. You did a great job here. This is now merged! Thanks to reviewers too for all the help given here. While merging I did some tweaks, but they are minor and mostly to ensure the style of the new contents match the existing contents. See a657538 |
fix #20828
I did not listed the
AsTwigTest
attribute in the attributes list as no doc make mention of use case of this attribute. Do I had it anyway without any link to it (or a link to the twig documentation)?Also I hope my wording is correct, feel free to ask me any adjustment 😄
I followed the plan of @javiereguiluz