Problem/Motivation

Running command

drupal-check -d modules/contrib/footnotes

generates following report :

5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------
  Line   footnotes.module
 ------ ----------------------------------------------------------
  22     Call to deprecated method l() of class Drupal:
         in Drupal 8.0.0 and will be removed before Drupal 9.0.0.
         Use \Drupal\Core\Link instead.
         Example:
 ------ ----------------------------------------------------------

 ------ ------------------------------------------------------------------------------
  Line   src/Plugin/Filter/FootnotesFilter.php
 ------ ------------------------------------------------------------------------------
  54     \Drupal calls should be avoided in classes, use dependency injection instead
  55     \Drupal calls should be avoided in classes, use dependency injection instead
  187    \Drupal calls should be avoided in classes, use dependency injection instead
  296    \Drupal calls should be avoided in classes, use dependency injection instead
 ------ ------------------------------------------------------------------------------


 [ERROR] Found 5 errors

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

panshulk created an issue. See original summary.

panshulk’s picture

Issue tags: +Drupal 9 compatibility
Tolyan4ik’s picture

Status: Active » Needs review

drupal-check report:
6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

[OK] No errors

panshulk’s picture

Hey @Tolyan4ik

I am using the version "8.x-2.1" to check for deprecated code report.

Which version are you using to check the report.

I can still see the errors and deprecation messages.

5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------
  Line   footnotes.module
 ------ ----------------------------------------------------------
  22     Call to deprecated method l() of class Drupal:
         in Drupal 8.0.0 and will be removed before Drupal 9.0.0.
         Use \Drupal\Core\Link instead.
         Example:
 ------ ----------------------------------------------------------

 ------ ------------------------------------------------------------------------------
  Line   src/Plugin/Filter/FootnotesFilter.php
 ------ ------------------------------------------------------------------------------
  54     \Drupal calls should be avoided in classes, use dependency injection instead
  55     \Drupal calls should be avoided in classes, use dependency injection instead
  187    \Drupal calls should be avoided in classes, use dependency injection instead
  296    \Drupal calls should be avoided in classes, use dependency injection instead
 ------ ------------------------------------------------------------------------------


 [ERROR] Found 5 errors

Hence, moving this back to "Active".

panshulk’s picture

Status: Needs review » Active
Issue tags: +DIACWApril2020

  • pifagor committed 6fc6374 on 8.x-2.x
    Issue #3119646: Drupal 9 Deprecated Code and Analysis Report
    
pifagor’s picture

Status: Active » Fixed

Hi @panshulk
You should check the dev version of the module.

I close it as fixed.

Status: Fixed » Closed (fixed)

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

cestmoi’s picture

@pifagor, I updated to the dev module and tested with upgrade_status for D9 compatibility and got the following results:

STATUS                 LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually            35                The module is defining "theme_footnote_link" theme function. Theme functions are deprecated. For more info, see  https://www.drupal.org/node/2575445.
--------------------------------------------------------------------------------
Check manually            39               The module is defining "theme_footnote_list" theme function. Theme functions are deprecated. For more info, see https://www.drupal.org/node/2575445.
--------------------------------------------------------------------------------

Can anyone please confirm its compatibility with D9 ?

Thanks

pifagor’s picture

@cestmoi

The dev version works with Drupal 9. However, the comments you mentioned should be corrected as well.