sonata-project / twig-extensions

Sonata twig extensions
https://docs.sonata-project.org/projects/twig-extensions
MIT License
85 stars 15 forks source link

Makes the TemplateBoxNode yield ready #412

Closed JanStorm closed 2 months ago

JanStorm commented 2 months ago

Subject

Twig 3.9 introduces a new "yield" mode in which all Node implementations should be flagged with #[YieldReady] once they've been made ready for "yield".

See https://github.com/twigphp/Twig/blob/3.x/CHANGELOG

For example, this has already been implemented in the symfony twig-bridge bundle: https://github.com/symfony/twig-bridge/commit/14a73aa32c9769b823f7a6f6c018d7c576e49fe7

I am targeting this branch, because its a non-breaking change, which solves a current twig deprecation since twig 3.9.

Changelog

### Added
- Support for twig's "yield" mode for output generation.
VincentLanglet commented 2 months ago

Hi @JanStorm

Thanks for the PR.

Can you run the linter to fix (unrelated) cs errors ? https://github.com/sonata-project/twig-extensions/actions/runs/10738861759/job/29879597578?pr=412

Thanks

JanStorm commented 2 months ago

yes of course, done!