* 3.x:
Fixing minor typo in Update inline_css.rst
Ignore static properties when using the dot operator
Fix CS
Fix constant() behavior when used with ??
Finish the work
fix indentation
Apply suggestions from code review
typo
fix merge
docs and changelog
typehint instead of checkArrow
checkArrow, typehints
invoke filter
* 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:
Remove obsolete code
Update CHANGELOG
Sandbox ArrayAccess and do sandbox checks before isset() checks
Fix sandbox handling for __toString()
Fix mistake in docs for `keys` filter
Update CHANGELOG
[String] Add SpanishInflector support for singular and plural
Add `find` to `Filters` docs
Remove duplicate test case
Revert "minor #4411 Add return type to getDebugInfo (ruudk)"
Add `$this` return type to Template::unwrap
Add link to TwigQI in docs "You might also be interested in" section
Add return type to compiled macro
This PR was merged into the 3.x branch.
Discussion
----------
Add return type to compiled macro
This makes it easier for TwigStan to analyze the return type.
Commits
-------
1e7c719e24 Add return type to compiled macro
* 3.x:
do not drop none digit characters from generated variable names
Revert "feature #4409 Deprecate the range function (fabpot)"
Deprecate the range function
Add return type to getDebugInfo
This PR was merged into the 3.x branch.
Discussion
----------
Rename Node classes related to variables
Whenever I work on Twig internals, it's always complicated to reason about variable names, probably because the class names are confusing. This PR is an attempt to find "better" and more explicit names.
This PR does the following renaming:
* `NameExpression` to `Variable\ContextVariable`
Represents the value of a context variable like `$context[VAR] ?? null`
* `AssignNameExpression` to `Variable\AssignContextVariable`
Represents a context variable assignment like in `$context[VAR] = `
* `TempNameExpression` to `Variable\LocalVariable`
Represents a "private" local variable like `$_l111`
Commits
-------
fc15e7ccbc Rename Node classes related to variables
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Documentation for types tag uses Twig types in examples instead of PHP
Specifically, "bool" => "boolean" and "int" => "number".
This aligns the `types` documentation with templates.rst. See #4362
Thanks, `@alexander`-schranz!
Commits
-------
f3e0a00cf0 Documentation for types tag uses Twig types in examples instead of PHP
* 3.x:
Add support for named arguments on macro calls and dot operator arguments
Improve deprecation messages
Simplify expression parser code
Refactor expression parser
chore: fix version added
Cleanup code
* 3.x:
Deprecate using Node directly, introduce EmptyNode and Nodes
Add support for inline comments
Update plural.rst: Fixing(?) broken links
Fix CS
Add support for accessing class constants with the dot operator
Fix getting a property on an object casted to an array
Replace strtr() by strtolower()
Improve escape deprecation message
Remove useless assign in compiled code
Add fixture filename as key
Be more precise about double-escaping
Fix template name in error for an unknown dynamic extends called from an include
These variables are passed in when the loop function is invoked when yielding.
Giving them the same internal var names complicates things for no good reason.
This PR was merged into the 4.x branch.
Discussion
----------
Remove useless Closure::bind in for loop
This has no effect. The returned value is not used.
https://www.php.net/manual/en/closure.bind.php
Commits
-------
c48aa4649f Remove useless Closure::bind in for loop
* 3.x:
Add start/end time accessors on Profile
Fix 'ignore missing' when used on an 'embed' tag
Fix the possibility to override an aliased block (via use)
Add test
Add hot cache reload for templates
Add RemovableCacheInterface
Add some tests
Optimize compiled code for "set" tag
Improve how trim behaves
Add more tests
Add return types in FileystemLoader
Add compile-time checks for the "matches" operator