Twig 3.25.0 introduces three notable changes: a new `needs_is_sandboxed` option for filters, functions, and tests that allows callables to detect and adapt behavior when running inside a sandbox; deterministic compiled output for templates using `{% embed %}`, enabling reproducible pre-compiled builds; and the ability to override `EscaperRuntime` via any runtime loader. Symfony 8.1's TwigBundle also benefits from the EscaperRuntime change, registering it as a service and adding a `twig.safe_class` resource tag.

2m read timeFrom symfony.com
Post cover image
Table of contents
Sandbox-aware filters, functions, and tests
24.6K Impressions