* 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
* 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
* 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
* 3.x:
Document how to customize the markdown_to_html converter
Make the include() function return a Markup object
Fix nested block() resolution when a directly rendered block calls parent()
Fix nested block() resolution when a directly rendered block calls parent()
Document storing an enum in a variable to avoid repeating its FQCN
Stop reporting a skipped test in IntegrationTestCase when there is no legacy test to run
Document {#--#} as the replacement for the deprecated spaceless filter
Skip the string cast in PrintNode when the expression is already a string and add tests
Ensure PrintNode is yielding string content
CoreExtension::getAttribute: small improvement regarding getter/isser/hasser
# Conflicts:
# CHANGELOG
# tests/Node/ForTest.php
* 3.x: (23 commits)
Bump version
Prepare the 3.26.0 release
Update CHANGELOG
Document that the sandbox doesn't protect against resource exhaustion
Document template_from_string caveats when used in a sandboxed env
Pre-escape HTML input on the `spaceless` filter
Add docs on Markup about the goal of this class in the context of a sandbox
Fix sandbox bypass in the "column" filter
Fix sandbox `__toString` bypasses
Validate macro name in MacroReferenceExpression constructor
Fix sandbox bypass: PHP code injection via _self / import macro reference
Fix deprecations in tests
Fix sandbox bypass in the `{% sandbox %}` tag when including a preloaded template
Encode single quotes as \x27 in Compiler::string()
Fix sandbox bypass: PHP code injection via {% use %} template name
Fix unbounded memoisation of `IntlDateFormatter` / `NumberFormatter`
Fix deprecation
[Profiler] Escape template and profile names in HtmlDumper
Bump version
Fix sandbox bypass: propagate sandbox state to checkArrow for source-policy sandboxing
...
# Conflicts:
# CHANGELOG
# doc/filters/spaceless.rst
# extra/cssinliner-extra/CssInlinerExtension.php
# extra/inky-extra/InkyExtension.php
# extra/markdown-extra/MarkdownExtension.php
# src/Environment.php
# src/ExpressionParser/Infix/DotExpressionParser.php
# src/Extension/CoreExtension.php
# src/Node/Expression/FilterExpression.php
# src/Node/Expression/FunctionExpression.php
# src/Node/Expression/TestExpression.php
# src/Node/ModuleNode.php
# src/NodeVisitor/SandboxNodeVisitor.php
# src/Resources/core.php
# src/TokenParser/SandboxTokenParser.php
# tests/Extension/SandboxTest.php
* origin/3.x:
Add a `needs_is_sandboxed` option for filters, functions, and tests
Bump version
Make embeds deterministic
[Doc] Document loose comparison in the `in` operator
[Doc] Reword whitespace control note about first-newline removal
Stop publishing extra package minor versions with no changes
Lazy load EscaperRuntime in EscaperExtension
Fix typo
Replace parent-child analogy in `doc/tags/extends.rst`
doc: Add missing toctree entries and fix ordering
Fix CHANGELOG
Bump version
Prepare the 3.24.0 release
* 3.x:
Bump version
Add a not about the return value of destructuring
Fix null-safe operator test
Bump version
Prepare the release
Update CHANGELOG
Add support for object and mapping destructuring
Rename classes
Assignment operator array destructuring
Fix doc notes
Fix doc notes
Add the = assignment operator
Fix grammar and spelling mistakes in documentation
* 3.x:
Fix documentation for getOperators()
bump version
Enhance enum.rst with dynamic case example
Add === and !== operators
Update extends.rst
Fix spread operator behavior
* 3.x:
use getShareDir as an indicator of Symfony version
Add 'invoke' to filters index
[Core] Fix cycle() with non-countable ArrayAccess+Traversable objects
Update .gitattributes to exclude phpstan configs
Bump version
Prepare the 3.22.1 release
Update CHANGELOG
`CoreExtension` : Make error message more readable
Add caution note for random function usage
Add throw tag to parse methods
* 3.x:
Update CHANGELOG
Fix accessing arrays with stringable objects as key
Update inky_to_html.rst: Updating link
Update replace.rst
[Doc] Tweaks in the escaping article
Compile 'index' with repr (not string) in EmbedNode
Introduce registerUndefinedTestCallback
Fix intl test
Bump minimum Commonmark requirement
Support two words test guard
Bump version
Improve documentation examples for `enum` and `enum_cases`
Avoid errors when failing to guess the template info for an error
Add note to format_datetime explaining how to install required extensions
Fix compatibility layer
It may be obvious, but I first thought initializing an BackendEnum with a certain value could be possible with `enum(FQCN, value)`, but it does not, it always returns the first case instance (if exists).
Instead, `enum(FQCN).from(value)` must be used, I think it's worth to improve `enum()` examples.
* 3.x:
Bump version
Prepare the 3.21.0 release
Tweaks html_cva docs
Update CHANGELOG
Create attributes `AsTwigFilter`, `AsTwigFunction` and `AsTwigTest` to ease extension development
Update html_cva.rst
* 3.x:
Fix wrong array index (again)
fix: update extension references in docs to use backticks
[Doc] Fix `code-block` in html_cva
[Docs] Replace `=` by `:` in code examples
fix: deprecated documentation
Use `:` instead of `=` for named argument in the docs
use EmptyNode instead of an Nodes instance without children
Fix `ModuleNode` instanciation when `$embeddedTemplates` is null
merge the Nodes and Node sections
reduce the number of deprecations being triggered
This PR was merged into the 3.x branch.
Discussion
----------
[Docs] Replace `=` by `:` in code examples
Replace `=` by `:` in code examples
* function/include
* filters/format_number
Commits
-------
84b0499dbd [Docs] Replace `=` by `:` in code examples
There is no `terminal` code-block in the current Twig documentation.
Using `bash` here instead is more in line with the other pages.
(...and will allow to simplify CSS needed for code blocks)
* 3.x: (30 commits)
Make {} optional for the types tag
Remove the note about types mapping argument
Add a note on the types locality
Fix CS
Fix typos in the docs
Use spl_object_id() instead of spl_object_hash()
Add `LastModifiedExtensionInterface` and implementation in `AbstractExtension` to track modification of runtime classes
Bump version
Optimize NameExpression compilation
Fix typo in enum twig doc functions
Remove dead method in ModuleNode
Bump version
Prepare the 3.18.0 release
Add support for `Twig\Markup`
Fix unary operator precedence change
Replace Twigfiddle by the new Twig playground
Fix MacroNode $name argument can be overridden
Ignore exceptions from undefined handlers when using the guard tag
[Doc] Update the docs about attribute() function
Fix doc
...
* 3.x:
Simplify enum usage in docs
Forbid adding Nodes to EmptyNode
Add phpstan analysis
Fix the intl-extra tests
Fix the string-extra tests when running with older symfony/string
Fix the exception message to match the expected one for not ready nodes
Add missing import
Add BC break note in CHANGELOG for 3.15
Fix CHANGELOG
Update CHANGELOG
Bump version
Prepare the 3.15.0 release