Conversation
| $hookContext = $this->parseMultitargetExpression(); | ||
| } else { | ||
| // Remove when Twig 3.21 support is dropped | ||
| $hookContext = $this->parser->getExpressionParser()->parseMultitargetExpression(); |
There was a problem hiding this comment.
This method is deprecated and no alternative is provided. In twig the usage of this method was replaced by a private method, so I'm applying the same logic here
twigphp/Twig@42c82e1#diff-c4fd0102f3bc6095b6b2c644eed251b98a65e46d2ed80329d97e9da3e97b984f
17b7308 to
d72e186
Compare
|
I've fixed the code style errors of the previous build, can someone approve the build to run again? |
| ], | ||
| $lineno, | ||
| ); | ||
| } else { |
There was a problem hiding this comment.
I'd prefer an early return style.
But maybe in the opposite way to remove the code easily after bumping the package.
That's only a suggestion, cause it's ok like this too.
There was a problem hiding this comment.
Yeah I'm also using the early return in regular code but mostly when doing deprecations like this I structure it in an if/else to make more clear what to remove when going to the next major or when dependencies are bumped
There was a problem hiding this comment.
I'd also prefer reversing the conditions and early returning, in other places as well, but ultimately think it's fine as is
There was a problem hiding this comment.
@acrobat Ok, could you try to apply the early returning that will contain the code to remove?
|
@acrobat Thx a lot for this PR! |
This PR fixes the Twig 3 deprecations reported in #307