• Development

    Using the Messenger Service Instead of drupal_set_message in Drupal 8

    As you may know, drupal_set_message()  is deprecated in Drupal 8.5.0.

    Here’s a quick example of using dependency injection to use the new Messenger service:

    mymodule.services.yml

    src/MymoduleAuthentication.php