studiometa / twig-toolkit

🔧 A set of useful extension and components for Twig
MIT License
9 stars 0 forks source link

[Bugfix] Fix the `html_element` tag with Twig 3.9.0 #23

Closed titouanmathis closed 7 months ago

titouanmathis commented 7 months ago

The new yield mode for output generation introduced in Twig 3.9.0 breaks our custom html_element tag.

This PR fixes this bug by using the new NodeCapture class if it exists to get the body of the tag.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.61%. Comparing base (9e73108) to head (b094d09).

:exclamation: Current head b094d09 differs from pull request most recent head 17f3f84. Consider uploading reports for the commit 17f3f84 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #23 +/- ## ============================================= + Coverage 95.83% 96.61% +0.77% - Complexity 51 52 +1 ============================================= Files 7 7 Lines 144 177 +33 ============================================= + Hits 138 171 +33 Misses 6 6 ``` | [Flag](https://app.codecov.io/gh/studiometa/twig-toolkit/pull/23/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=studiometa) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/studiometa/twig-toolkit/pull/23/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=studiometa) | `96.61% <100.00%> (+0.77%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=studiometa#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.