Skip to content
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

Do not pass "$tag" parameter to Twig_Node constructor #101

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

pan93412
Copy link
Contributor

@pan93412 pan93412 commented Dec 11, 2024

Since twig/twig 3.12: The "tag" constructor argument of the "NotFloran\MjmlBundle\Twig\Node" class is deprecated and ignored (check which TokenParser class set it to "mjml"), the tag is now automatically set by the Parser when needed.

Therefore, I select the constructor according to the Twig version (since you accept the Twig version less than 3.12):

  • If the environment Twig version is greater than (or equal to) 3.12, we don't pass $tag.
  • Otherwise, we pass it like we used to do.

I have dogfood it and have not see anything wrong. The deprecation message indeed disappeared.

Fixed #100

> Since twig/twig 3.12: The "tag" constructor argument of the "NotFloran\MjmlBundle\Twig\Node"
class is deprecated and ignored (check which
TokenParser class set it to "mjml"), the tag is now
automatically set by the Parser when needed.
@notFloran
Copy link
Member

Thanks @pan93412 !

@notFloran notFloran merged commit 83d8e44 into Akollade:main Dec 11, 2024
14 checks passed
@pan93412 pan93412 deleted the fix-issue-100 branch December 11, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants