Skip to content

« Twig » blog posts

Updates and new features of the Twig template language used in Symfony and PHP applications.

Twig 4.0 includes block composition, available since Twig 3.29.
September 25, 2026 #Twig πŸ‘€ 2 ❀️ 8 πŸ‘ 3 πŸŽ‰ 2
Twig 3.29 introduces documentation comments for describing template APIs without changing their rendered output.
August 21, 2026 #Twig ❀️ 2 πŸ‘ 3 πŸš€ 3 πŸŽ‰ 2
Twig 4.0 makes macros strict: required arguments, explicit variadic arguments, mandatory parentheses, and clear errors instead of silently broken output.
August 6, 2026 #Twig ❀️ 6 πŸ‘ 2 πŸš€ 4
Twig 4.0 isolates untrusted templates in a dedicated environment.
August 5, 2026 #Twig ❀️ 2 πŸ‘ 1 πŸš€ 1
Twig 3.28.0 improves syntax error reporting with column numbers, revives dynamic macro calls through the dot operator, and refines the sandbox.
July 3, 2026 #Twig ❀️ 3
Twig 4.0 replaces the getOperators() array with expression parser classes, all driven by one small and beautiful parsing algorithm.
June 17, 2026 #Twig ❀️ 5 πŸ‘ 3 πŸš€ 4
Twig 4.0 closes the sandbox blind spots: tests are now checked, silent exceptions are gone, and safe callables can be marked always allowed.
June 15, 2026 #Twig πŸ‘ 6 πŸš€ 2
For Twig 4.0, I rebuilt the whole loop machinery: loop.last now works with any iterator, new helpers replace the bookkeeping code we have all written a hundred times, the if condition makes a comeback, and recursive loops become a first-class feature.
June 11, 2026 #Twig ❀️ 22 πŸ‘ 7 πŸš€ 9 πŸŽ‰ 8
Twig 3.27.1 released
May 30, 2026 #Twig πŸ‘ 1
Sandbox property allowlist bypass via the `column` filter under `SourcePolicyInterface`
May 27, 2026 #Twig