Skip to content

Commit

Permalink
Add deprecation warning for sort tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
chesn0k committed May 20, 2024
1 parent 7b0ff58 commit 035cfdb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Twig/TwigSortTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ final class TwigSortTokenParser extends AbstractTokenParser {
* {@inheritdoc}
*/
public function parse(Token $token): Node {
\trigger_error('The sort tag is deprecated in 3.6.0 and will be removed in 5.x, use the sort_namespaces twig filter.', \E_USER_WARNING);
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse(
static fn (Token $token): bool => $token->test('endsort'),
Expand Down

0 comments on commit 035cfdb

Please sign in to comment.