Fabien Potencier
55afb2e084
Deprecate cloning a Twig environment
2026-09-18 16:52:58 +01:00
Fabien Potencier
d6b81f9074
Allow block chains to be composed of other block chains
2026-09-14 11:17:44 +02:00
Fabien Potencier
897717d78f
Resolve block chains against the render context instead of freezing lineages
2026-09-12 00:03:19 +02:00
Fabien Potencier
49f814ea26
Template runtime and block composition
2026-09-11 04:57:38 -07:00
Fabien Potencier
c32656815b
minor #4908 Remove the documentation comments compilation overhead (fabpot)
...
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Remove the documentation comments compilation overhead
Documentation comments are now attached to semantic nodes during parsing, removing the dedicated AST traversal. Token parsers returning placeholder nodes can select the semantic documentation target.
Commits
-------
60eed4ccd5 Remove the documentation comments compilation overhead
2026-08-29 00:19:33 +02:00
Fabien Potencier
60eed4ccd5
Remove the documentation comments compilation overhead
2026-08-29 00:19:29 +02:00
Fabien Potencier
fdfef2b14a
Clarify source function trust requirements
2026-08-28 18:11:30 +02:00
Fabien Potencier
59f7d67848
Document that reusing a non-rewindable iterator after destructuring is unsupported
2026-08-27 13:43:07 +02:00
Fabien Potencier
099fa3471a
Document that sequence destructuring consumes one value per pattern slot
2026-08-27 13:07:47 +02:00
Fabien Potencier
abbdf82823
Fix the html_attr documentation about iterables in data attributes
2026-08-27 13:07:41 +02:00
Fabien Potencier
be220e6fd8
Warn about untrusted input with the default Tempest markdown converter
2026-08-27 13:07:34 +02:00
Fabien Potencier
1205b8b6ca
Document that overriding MacroNode::compile() is not supported anymore
2026-08-27 13:07:26 +02:00
Fabien Potencier
207f873739
Document that include_only keeps global variables available
2026-08-27 13:07:13 +02:00
Fabien Potencier
cf971e1a59
Remove lazy macro import resolution
2026-08-27 12:17:08 +02:00
Fabien Potencier
1de0bfceb4
Honor date formatter prototype calendars
2026-08-27 08:44:26 +02:00
Hugo Alliaume
9b18e3757d
Extract htmlAttrValue() from html_attr for standalone attribute rendering
2026-08-26 16:46:53 +02:00
Fabien Potencier
e2014eb92a
Fix Traversable sequence destructuring semantics
2026-08-23 09:40:21 +02:00
Fabien Potencier
6806e30474
Attach documentation comments to nodes
2026-08-19 16:41:17 +02:00
Fabien Potencier
9036d8c5aa
feature #4434 Add the include_only function (fabpot)
...
This PR was merged into the 3.x branch.
Discussion
----------
Add the include_only function
Commits
-------
dc8f96df3e Add the include_only function to render a template without access to the current context
2026-08-16 10:53:58 +02:00
Romain Monteil
aa17f59877
Add support for tempest/markdown in markdown-extra
2026-08-12 13:02:21 +02:00
Fabien Potencier
dc8f96df3e
Add the include_only function to render a template without access to the current context
2026-08-11 20:58:31 +02:00
Fabien Potencier
b53e100444
Nested macro imports
2026-08-03 10:30:32 +02:00
Fabien Potencier
34d9c67d38
Deprecate using parentheses when testing a macro with the defined test
2026-07-31 12:09:23 +02:00
Fabien Potencier
d7f8b4eb1c
Redesign macro calls and argument handling
2026-07-30 13:53:24 +02:00
Fabien Potencier
b762bc94b9
Make the sandbox a first-class citizen with a dedicated Sandbox class
2026-07-30 12:05:47 +02:00
Fabien Potencier
ad305b414e
Deprecate macro calls without parentheses
2026-07-28 16:13:23 +02:00
Fabien Potencier
a2a4c1b4f2
feature #4876 Rename macro variable AST nodes (fabpot)
...
This PR was merged into the 3.x branch.
Discussion
----------
Rename macro variable AST nodes
The current name are just wrong as these classes are only used in the context of macros. They were confusing.
Commits
-------
be36fee09e Rename macro variable AST nodes
2026-07-28 12:07:42 +02:00
Fabien Potencier
be36fee09e
Rename macro variable AST nodes
2026-07-28 11:53:50 +02:00
Fabien Potencier
222a7f3f9a
Clarify the security scope for untrusted templates
2026-07-28 08:40:21 +02:00
Fabien Potencier
258089b8a6
Deprecate duplicate macro definitions
2026-07-27 12:24:45 +02:00
Marilena Ruffelaere
02382585e9
add shadowing example
2026-07-20 18:57:40 +02:00
Marilena RUFFELAERE
7234d51ec8
Update for.rst
...
Add context and explanation about loop.parent
2026-07-17 15:42:51 +02:00
Fabien Potencier
29b66fd916
Document sandbox handling of magic __call() methods
2026-07-12 15:45:50 +02:00
Fabien Potencier
5bcd992138
feature #4852 [Intl] Add format_list filter using PHP 8.5's IntlListFormatter (BreyndotEchse)
...
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
[Intl] Add format_list filter using PHP 8.5's IntlListFormatter
Adds a new `format_list` Twig filter to IntlExtension that formats arrays using using PHP 8.5's IntlListFormatter
On PHP < 8.5, using the filter throws a RuntimeError explaining the dependency on IntlListFormatter (Checks if `class_exists` to allow polyfills).
CI workflow only covered up to PHP 8.4, so I extended it to also run PHPUnit against 8.5.
phpstan's PHP version also bumped to 8.5.
Commits
-------
163f1b6341 [Intl] Add format_list filter using PHP 8.5's IntlListFormatter
2026-07-08 22:22:47 +02:00
Marvin Feldmann
163f1b6341
[Intl] Add format_list filter using PHP 8.5's IntlListFormatter
2026-07-08 22:22:44 +02:00
Matthieu Lempereur
fc4dee393c
fix version in deprecation message for tag usage outside of root template
2026-07-08 19:01:20 +02:00
Fabien Potencier
ec0f5d5dad
Tweak previous merge
2026-06-19 08:06:30 +02:00
Andy Blum
068a2e6cb4
Add documention note about variable scope of override blocks in {% embed ... only %}
2026-06-19 08:03:24 +02:00
Fabien Potencier
a69d3dc71e
Keep captured block definitions supported
2026-06-11 07:43:59 +02:00
Fabien Potencier
16e5a937ed
Clarify captured block deprecation wording
2026-06-11 07:43:47 +02:00
Fabien Potencier
d96eac3895
Fix correctness visitor regressions
2026-06-11 07:43:46 +02:00
Fabien Potencier
c12100525e
Introduce a CorrectnessNodeVisitor to validate that templates are semantically correct
2026-06-11 07:43:33 +02:00
Fabien Potencier
f938f6d153
Mark Markup as final
2026-06-07 10:29:17 +02:00
Fabien Potencier
612dc96c18
feature #4838 Allow calling a macro with a dynamic name via the dot operator (fabpot)
...
This PR was merged into the 3.x branch.
Discussion
----------
Allow calling a macro with a dynamic name via the dot operator
Closes #4715
Commits
-------
87093aab9e Allow calling a macro with a dynamic name via the dot operator
2026-06-07 09:36:06 +02:00
Fabien Potencier
87093aab9e
Allow calling a macro with a dynamic name via the dot operator
2026-06-06 17:10:52 +02:00
Fabien Potencier
416d07da1d
Add an allow-list for tests to the sandbox security policy
2026-06-06 11:08:56 +02:00
Fabien Potencier
cf4b50d181
Clarify sandbox always-allowed trust boundary
2026-06-06 09:19:48 +02:00
Fabien Potencier
29c4325afd
Bump version to 3.28.0 for the always_allowed_in_sandbox feature
2026-06-06 08:56:59 +02:00
Fabien Potencier
7fd87a381f
Document the criteria for always-allowed sandbox items and list 4.0 built-ins
2026-06-06 08:56:58 +02:00
Fabien Potencier
2d75c87d05
Add an always_allowed_in_sandbox flag for filters, functions, and tags
2026-06-06 08:56:58 +02:00