Module is using drupal_set_message function to display messages which was deprecated and will be no longer working in Drupal 9 which is planned to be released in June 2020.

Comments

agrochal created an issue. See original summary.

agrochal’s picture

StatusFileSize
new912 bytes

I've actually removed deprecated code and replaced it with Messenger service. I attach .patch file.

agrochal’s picture

Status: Active » Needs review
agrochal’s picture

Status: Needs review » Needs work

I’ll replace messenger service into dependency injection.

agrochal’s picture

StatusFileSize
new2.06 KB

Okay, I've created the patch which replaces drupal_set_message with messenger service which is added in dependency injection.

agrochal’s picture

Status: Needs work » Needs review
maliknaik’s picture

@agrochal, ConfigFormBase uses MessengerTrait, so you can directly use $this->messenger()->addMessage(), and there is no need for Dependency injection here.

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Form%21ConfigFormBase.php/class/ConfigFormBase/8.8.x

maliknaik’s picture

Status: Needs review » Needs work
agrochal’s picture

Issue summary: View changes
StatusFileSize
new15.64 KB
agrochal’s picture

StatusFileSize
new880 bytes
new4.38 KB

Okay, here's new patch.

agrochal’s picture

Status: Needs work » Needs review
maliknaik’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #10 looks fine.

Drupal check result before applying the patch:

[2K 2/2 [============================] 100%

 ------ ----------------------------------------------------------------------
  Line   src\Form\SimpleCoolMessage.php
 ------ ----------------------------------------------------------------------
  118    Call to deprecated function drupal_set_message():
         in drupal:8.5.0 and is removed from drupal:9.0.0.
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
 ------ ----------------------------------------------------------------------

 [ERROR] Found 1 error

Drupal check result after applying the patch:

[2K 2/2 [============================] 100%

 [OK] No errors