php drupal-check.phar modules/contrib/dfp/
 22/22 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ --------------------------------------------------- 
  Line   src/Form/Tag.php                                   
 ------ --------------------------------------------------- 
  212    Call to deprecated function drupal_set_message().  
  215    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------- 
  Line   src/Tests/DfpTestBase.php                                                          
 ------ ----------------------------------------------------------------------------------- 
  122    Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode.  
 ------ ----------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------- 
  Line   src/Tests/DisplayTagTest.php                                                       
 ------ ----------------------------------------------------------------------------------- 
  30     Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode.  
  206    Call to deprecated method strtoupper() of class Drupal\Component\Utility\Unicode.  
 ------ ----------------------------------------------------------------------------------- 

 ------ ----------------------------------------- 
  Line   src/View/dfp.adtest.inc                  
 ------ ----------------------------------------- 
  35     Calls to function kpr should not exist.  
 ------ ----------------------------------------- 

 ------ ------------------------------------------------------------------------- 
  Line   tests/src/Unit/View/TagViewTest.php                                      
 ------ ------------------------------------------------------------------------- 
  74     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.  
  101    Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.  
 ------ ------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 8 errors

Comments

Sergiu Stici created an issue. See original summary.

sergiu stici’s picture

Status: Active » Needs review
StatusFileSize
new4.81 KB

Here is the patch, please review.

fgm’s picture

Status: Needs review » Needs work

New deprecations are detected by upgrade_status:

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Fix now        18   Class Drupal\dfp\Tests\DfpTestBase extends deprecated class
                    Drupal\simpletest\WebTestBase. Deprecated in drupal:8.8.0
                    and is removed from drupal:9.0.0. Instead, use
                    \Drupal\Tests\BrowserTestBase. See
                    https://www.drupal.org/node/3030340. Replacement available
                    from drupal:8.6.0.
--------------------------------------------------------------------------------
Fix now        38   Call to method setUp() of deprecated class
                    Drupal\simpletest\WebTestBase. Deprecated in drupal:8.8.0
                    and is removed from drupal:9.0.0. Instead, use
                    \Drupal\Tests\BrowserTestBase. See
                    https://www.drupal.org/node/3030340. Replacement available
                    from drupal:8.6.0.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/dfp/src/View/TagViewBuilder.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Fix now        65   Parameter $entity_manager of method
                    Drupal\dfp\View\TagViewBuilder::__construct() has typehint
                    with deprecated interface
                    Drupal\Core\Entity\EntityManagerInterface. Deprecated in
                    drupal:8.0.0 and is removed from drupal:9.0.0.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/dfp/dfp.info.yml

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually 0    Add <code>core_version_requirement: ^8 || ^9</code> to
                    dfp.info.yml to designate that the module is compatible with
                    Drupal 9. See https://drupal.org/node/3070687.
--------------------------------------------------------------------------------

In addition, the call to the parent constructor in TagViewBuilder is incorrect, missing the optional (required in 9.0) fourth and fifth parameters.

fgm’s picture

Title: Deprecated Code Report » Drupal 9 version
Status: Needs work » Needs review
Issue tags: +Drupal 9 compatibility
StatusFileSize
new12.07 KB
new7.48 KB

Suggested patch fixing all current issues.

bleen’s picture

Havent tested anything, but #4 looks good upon review

vladimiraus’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Drupal 9 porting weekend

Applies fine and removes all the warning and errors. Thanks

fgm’s picture

@bleen : any hope of having it be merged ? It is currently a blocker for an existing project.

  • VladimirAus committed d6463ce on 8.x-1.x authored by fgm
    Issue #3082242 by fgm, Sergiu Stici: Drupal 9 version
    
vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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