mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-12 21:37:05 +00:00
1b9df761b6
This PR was squashed before being merged into the 3.x branch. Discussion ---------- Allow to use a dynamic attribute on the . operator via () Closes #3598 As one can think that the `attribute` function has some special power compared to the `.` operator (like using Symfony PropertyAccess), I think it's better to use the `.` operator for dynamic attributes as well. Using `()` makes it clear that the behavior is the same as the `.` operator (using `()` is similar to the way one can use dynamic mapping names (like in `{ (name): value }`). Commits -------048183eaa6Add cross-link8d1af0fc03Let's no deprecate the attribute function yet333638e8e6Allow to use a dynamic attribute on the . operator via ()