This PR was squashed before being merged into the 4.x branch.
Discussion
----------
4.x cleanup
Commits
-------
4493d0747a Merge the CHANGELOG entries about the inert attributes
2a16651387 Explain that the inert attribute classes are kept for static analysis, not class loading
991294ae39 Drop the 3.x version from the SandboxExtension internal annotation
69a4e43f0a Remove the inert FirstClassTwigCallableReady attribute from the built-in nodes
bb0dbfc229 Stop passing the template source to the sandbox checks that no longer use it
a5abf30b19 Remove the deprecation getters from TwigCallableInterface
dbfd06ffba Make Markup final
40b0349558 Run the attribute function fixtures as regular integration tests
6b7dfe3dcc Remove outdated references to older Twig versions
ea98cfa8c8 Remove the static test container fallback from the extra bundle integration test
57ef149e3b Remove the League CommonMark fallback for converters without convert()
* 3.x:
Reuse the template wrapper of an already loaded template
Stop the escaping safe analysis from retaining every analyzed node
Allow to call TemplateWrapper::unwrap() without arguments
Expose the escaping strategy a template was compiled with
Improve macro call performance
Fix IntlExtension inheriting values derived by ICU from a date formatter prototype
Fix array access with a Stringable key on subclasses of ArrayObject and ArrayIterator
Ignore the PHPUnit 10+ cache directory
Cover and document the matches operator throwing on an invalid UTF-8 subject
Report a clear error when a string cannot be split into characters
Deprecate cloning a Twig environment
Report the macro call parentheses deprecation once per call site and name the macro
Bump version
Prepare the 3.29.0 release
Update CHANGELOG
# Conflicts:
# .gitignore
# CHANGELOG
# doc/deprecated.rst
# src/Environment.php
# src/NodeVisitor/CorrectnessNodeVisitor.php
# src/NodeVisitor/SafeAnalysisNodeVisitor.php
# src/Template.php
# tests/Fixtures/macros/call_without_parentheses.legacy.test
# tests/ParserTest.php
# tests/TemplateTest.php
# tests/TwigMacroTest.php
* 3.x:
Resolve block chains against the render context instead of freezing lineages
Resolve constant parent templates once instead of on every lookup
Template runtime and block composition
Fix wrapping the Twig cache pool in a second tag aware adapter
Check that the use tag is allowed before resolving trait templates
# Conflicts:
# CHANGELOG
# extra/twig-extra-bundle/TwigExtraBundle.php
# src/Template.php
* 3.x: (26 commits)
Remove the documentation comments compilation overhead
Clarify source function trust requirements
Throw on PCRE errors in the matches operator
Document that reusing a non-rewindable iterator after destructuring is unsupported
Release destructuring temporaries after assignment
Deprecate prefixed macro definedness checks
Fix duplicate macro deprecation wording
Throw when list formatting fails
Document that sequence destructuring consumes one value per pattern slot
Fix the html_attr documentation about iterables in data attributes
Warn about untrusted input with the default Tempest markdown converter
Document that overriding MacroNode::compile() is not supported anymore
Merge overlapping CHANGELOG entries for the destructuring fatal error fix
Document that include_only keeps global variables available
Remove lazy macro import resolution
Honor date formatter prototype calendars
Fix Stringable keys for ArrayAccess implementations
Fix repeated object destructuring evaluation
Restore void return type compatibility for extension points
Reject destructuring patterns containing no variables
...
# Conflicts:
# CHANGELOG
# doc/deprecated.rst
# doc/filters/format_datetime.rst
# extra/twig-extra-bundle/DependencyInjection/Compiler/MissingExtensionSuggestorPass.php
# extra/twig-extra-bundle/DependencyInjection/TwigExtraExtension.php
# extra/twig-extra-bundle/TwigExtraBundle.php
# src/MacroNamespace.php
# src/Node/MacrosNode.php
# src/Parser.php
# src/Test/IntegrationTestCase.php
# src/Test/NodeTestCase.php
# tests/CallMacroTest.php
# tests/ExpressionParserTest.php
# tests/Fixtures/macros/duplicate_definition.legacy.test
# tests/Node/MacrosTest.php
# tests/ParserTest.php
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
* 3.x:
Add support for tempest/markdown in markdown-extra
Add the include_only function to render a template without access to the current context
Clarify duplicate macro deprecation message
Deduplicate template error handling
# Conflicts:
# .gitignore
# CHANGELOG
# extra/markdown-extra/composer.json
# src/Extension/CoreExtension.php
# src/Parser.php
# src/Template.php
# tests/Fixtures/macros/duplicate_definition.legacy.test
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
* 3.x:
Deprecate using parentheses when testing a macro with the defined test
# Conflicts:
# CHANGELOG
# doc/deprecated.rst
# src/ExpressionParser/Infix/DotExpressionParser.php
# src/ExpressionParser/Infix/FunctionExpressionParser.php
# src/ExpressionParser/Infix/IsExpressionParser.php
# tests/Fixtures/macros/call_without_parentheses.legacy.test
# tests/ParserTest.php
* 3.x:
Make the sandbox a first-class citizen with a dedicated Sandbox class
# Conflicts:
# CHANGELOG
# doc/deprecated.rst
# doc/tags/sandbox.rst
# phpstan-baseline.neon
# src/Extension/CoreExtension.php
# src/Extension/SandboxExtension.php
# src/Sandbox/SecurityPolicy.php