Original drupal_set_message() says:

 * @deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
 *   Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.

This however does not show drupal_set_message() as deprecated in IDE (ones which normally would) since the same function is declared by Feeds (tests/src/Unit/FeedsUnitTestCase.php).

Same thing with at least drupal_tempnam() and drupal_basename() as well

Comments

Dropa created an issue. See original summary.

dropa’s picture

Title: Declaring drupal_set_message() in FeedsUnitTestCase hides deprecation of original » Declaring drupal_set_message() and others in FeedsUnitTestCase hides deprecation of original
Issue summary: View changes
megachriz’s picture

idebr’s picture

Status: Active » Needs review
StatusFileSize
new21.92 KB

Attached patch replaces the stubs for drupal_set_message(), drupal_tempnam() and drupal_basename()

  • MegaChriz committed 68029f1 on 8.x-3.x authored by idebr
    Issue #3015687 by idebr: Replaced deprecated drupal_set_message() with...
megachriz’s picture

Status: Needs review » Fixed

@idebr
Thanks for the patch! It took me a while before I got time to review this. I was a bit unsure about RawFetcherResult. I see that I need to update a custom code for a client for that (an extending class that was not calling the parent constructor), but I think that the solution for injecting the file system here is the right one.

Committed #4.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.