Remove deprecated drupal_set_message()
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3049611. -->
Reported by: [feyp](https://www.drupal.org/user/998680)
>>>
<h2>Synopsis</h2>
<p>We want a smooth upgrade path to Drupal 9, so we want to remove deprecated code from the module.</p>
<h2>Discussion</h2>
<p>Current <a href="https://github.com/mglaman/drupal-check">drupal_check</a> report:</p>
<pre>------ --------------------------------------------------- <br> Line src/Form/ConfigurationForm.php <br> ------ --------------------------------------------------- <br> 97 Call to deprecated function drupal_set_message(). <br> 107 Call to deprecated function drupal_set_message(). <br> ------ --------------------------------------------------- <br><br> ------ --------------------------------------------------- <br> Line src/Tracker.php <br> ------ --------------------------------------------------- <br> 153 Call to deprecated function drupal_set_message(). <br> ------ --------------------------------------------------- </pre><h2>Proposed resolution</h2>
<p><code>drupal_set_message()</code> was deprecated during the 8.5 cycle, but we can't depend on patch releases due to <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-3"><a href="https://www.drupal.org/project/drupal/issues/2641658" title="Status: Closed (duplicate)">#2641658: Module version dependency in .info.yml is ineffective for patch releases</a></span>, so we would need to depend on 8.6. Since 8.7 is scheduled for release in May and 8.5 security support will end at that time, now is probably a good time to introduce a dependency on 8.6 for the next release. So the plan would be to depend on 8.6 and start using <code>MessengerTrait</code>.</p>
issue