API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Utility%2...
The docs say:
return Token::replace($text, $data);
But replace() is not static and calling it like that produces a warning.
The sample code should use \Drupal::token()/
Issue fork drupal-3348381
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3348381-incorrect-example-code
changes, plain diff MR !3800
Comments
Comment #4
rohan-sinha commentedRead the doc and replaced Token::replace($text, $data) with \Drupal::token()/, ready to review, thanks.
Comment #5
joachim commentedThanks!
Comment #9
larowlanCommitted to 10.1.x and backported to 10.0.x and 9.5.x
Thanks