Skip to content

Commit

Permalink
Use trigger_deprecation() for deprecation message for sort tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
chesn0k committed May 20, 2024
1 parent ceb25e3 commit 0fc9d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Twig/TwigSortTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +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);
\trigger_deprecation('chi-teck/drupal-code-generator', '3.6.0', 'The sort twig tag is deprecated and will be removed in 5.x, use the sort_namespaces twig filter.');
$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 0fc9d31

Please sign in to comment.