* 3.x:
Deprecate some internal methods from Parser
Move code from ExtendsTokenParser to Parser
Update Node::__toString() to include the node tag if set
Fix class name
Fix error message
This PR was merged into the 3.x branch.
Discussion
----------
Deprecate some internal methods from Parser
Commits
-------
9e6c4a6a Deprecate some internal methods from Parser
This PR was merged into the 3.x branch.
Discussion
----------
Move code from ExtendsTokenParser to Parser
Commits
-------
cf472760 Move code from ExtendsTokenParser to Parser
This PR was merged into the 3.x branch.
Discussion
----------
Update Node::__toString() to include the node tag if set
Commits
-------
157d36ae Update Node::__toString() to include the node tag if set
This PR was merged into the 3.x branch.
Discussion
----------
Deprecate returning null from TokenParserInterface::parse()
Commits
-------
0c751361 Deprecate returning null from TokenParserInterface::parse()
This PR was merged into the 3.x branch.
Discussion
----------
Deprecate not passing a `BodyNode` instance as the body of a `ModuleNode` or `MacroNode` constructor
Commits
-------
51e93aa1 Deprecate not passing a BodyNode instance as the body of a ModuleNode constructor
This PR was merged into the 3.x branch.
Discussion
----------
Update a phpdoc (ModuleNode is final now)
Commits
-------
313303b3 Update a phpdoc (ModuleNode is final now)
This PR was merged into the 3.x branch.
Discussion
----------
Add support for integers in methods of `Twig\Node\Node` that take a Node name
Closes#3811
Commits
-------
1ee4210b Deprecate node names that are not strings or integers
This PR was merged into the 3.x branch.
Discussion
----------
Deprecate OptimizerNodeVisitor::OPTIMIZE_TEXT_NODES
Refs #4146
While trying to debug #4146, I realized that this optimization is not possible as we don't know how nodes are going to be used.
See the script provided in #4146 to reproduce the problem.
`@brandonkelly` Can you confirm that this fixes your problem? Maybe there is also an issue with yield vs echo, but the script provided in the issue runs fine for me after this PR.
Commits
-------
7121673c Deprecate OptimizerNodeVisitor::OPTIMIZE_TEXT_NODES
This PR was squashed before being merged into the 4.x branch.
Discussion
----------
Add private types on 4.x
(WIP but i open to gather early feedback / comments)
Objective: add missing types
- [x] Private properties
- [x] Return type on private methods
- [ ] Argument types on private methods (?not sure)
Maybe "`@internal`" then
Commits
-------
72bbe489 Add private types on 4.x
This PR was squashed before being merged into the 4.x branch.
Discussion
----------
Do not hide unnecessary escape characters
Follow up of #4176, #4123 and #2712.
Now that we have deprecated unnecessary escape in v3, we can change the behavior in v4.
With this change, unnecessary will no longer be ignored, but handled like any other character.
This allows for writing fully qualified class names like this:
```twig
{{ constant('App\Entity\User::SOME_CONSTANT') }}
```
Instead of having to escape the `\` in v3:
```twig
{{ constant('App\\Entity\\User::SOME_CONSTANT') }}
```
/cc `@fabpot` `@stof`
Commits
-------
53c24bfc Do not hide unnecessary escape characters
This PR was merged into the 3.x branch.
Discussion
----------
ChainLoader constructor should accept iterable instead of array
Closes#4200
Commits
-------
6ef13d1eResolves#4200