---
title: "Twig 3.27.1 released (Symfony Blog)"
url: https://daily.dev/posts/twig-3-27-1-released-symfony-blog--kppgfppxy
source_url: https://symfony.com/blog/twig-3-27-1-released
type: article
source: "Symfony"
published: 2026-05-30T17:30:41.967Z
updated: 2026-05-30T17:31:01.812Z
tags: ["php", "symfony"]
reading_time: 2
upvotes: 6
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Twig 3.27.1 released (Symfony Blog)

**[Symfony](https://daily.dev/sources/symfony)** · 2 min read · 6 upvotes · 0 comments

## Summary

Twig 3.27.1 is a patch release fixing two regressions from the sandbox hardening in 3.27.0. First, typed iterable arguments (like Symfony's FormView) were incorrectly being converted to plain arrays before being passed to host code, breaking type expectations. The fix now walks IteratorAggregate objects in place and passes the original object unchanged while still policy-checking yielded elements. Second, array access with a Stringable object key behaved inconsistently between the optimized and regular compiled paths. The optimized path now coerces the key to a string consistently, and in sandbox mode the coercion is subject to the __toString policy.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://symfony.com/blog/twig-3-27-1-released>

## Similar posts on daily.dev

- [Twig 3.26.0 released \(Symfony Blog\)](https://daily.dev/posts/twig-3-26-0-released-symfony-blog--ipy5xm62a) · Symfony · 0 upvotes · 0 comments
- [Twig 3.25.0 released \(Symfony Blog\)](https://daily.dev/posts/twig-3-25-0-released-symfony-blog--2oth00kk1) · Symfony · 9 upvotes · 0 comments
- [Twig 3.28.0 released \(Symfony Blog\)](https://daily.dev/posts/twig-3-28-0-released-symfony-blog--dpjk2dnjm) · Symfony · 4 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#symfony](https://daily.dev/tags/symfony)

[View this post on daily.dev](https://daily.dev/posts/twig-3-27-1-released-symfony-blog--kppgfppxy)
