mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-20 14:36:57 +00:00
1b9df761b6d456e98195df7041ca8c2a0713132c
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 ()
…
Twig, the flexible, fast, and secure template language for PHP
==============================================================
Twig is a template language for PHP.
Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.
Sponsors
--------
.. raw:: html
<a href="https://docs.blackfire.io/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo">
<img src="https://static.blackfire.io/assets/intemporals/logo/png/blackfire-io_secondary_horizontal_transparent.png?1" width="255px" alt="Blackfire.io">
</a>
More Information
----------------
Read the `documentation`_ for more information.
.. _documentation: https://twig.symfony.com/documentation
Description
Languages
PHP
99.9%