Problem/Motivation

drupal-check results on commit hash:
source : [git] https://git.drupal.org/project/content_access 0ee9336da6d5fd812650d332b639603148ec1906
source : http://cgit.drupalcode.org/content_access


 ------ --------------------------------------------------- 
  Line   content_access.module                              
 ------ --------------------------------------------------- 
  775    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Form/ContentAccessAdminSettingsForm.php        
 ------ --------------------------------------------------- 
  76     Call to deprecated method l() of class Drupal.     
  168    Call to deprecated function drupal_set_message().  
  172    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Form/ContentAccessPageForm.php                 
 ------ --------------------------------------------------- 
  102    Call to deprecated function drupal_set_message().  
  142    Call to deprecated function drupal_set_message().  
  186    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Plugin/RulesAction/ActionGrantNodePermissions.php               
 ------ -------------------------------------------------------------------- 
         Class Drupal\rules\Core\RulesActionBase not found and could not be  
         autoloaded.                                                         
 ------ -------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Plugin/RulesAction/ActionResetNodePermissions.php               
 ------ -------------------------------------------------------------------- 
         Class Drupal\rules\Core\RulesActionBase not found and could not be  
         autoloaded.                                                         
 ------ -------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Plugin/RulesAction/ActionRevokeNodePermissions.php              
 ------ -------------------------------------------------------------------- 
         Class Drupal\rules\Core\RulesActionBase not found and could not be  
         autoloaded.                                                         
 ------ -------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Plugin/RulesAction/ActionUserGrant.php                          
 ------ -------------------------------------------------------------------- 
         Class                                                               
         Drupal\content_access\Plugin\RulesAction\ContentAccessUserRulesAct  
         ionBase not found and could not be autoloaded.                      
 ------ -------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Plugin/RulesAction/ActionUserRevoke.php                         
 ------ -------------------------------------------------------------------- 
         Class                                                               
         Drupal\content_access\Plugin\RulesAction\ContentAccessUserRulesAct  
         ionBase not found and could not be autoloaded.                      
 ------ -------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Plugin/RulesAction/ContentAccessUserRulesActionBase.php         
 ------ -------------------------------------------------------------------- 
         Class Drupal\rules\Core\RulesActionBase not found and could not be  
         autoloaded.                                                         
 ------ -------------------------------------------------------------------- 

                                                                           
 [ERROR] Found 13 errors                                                   
                                                                           

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

mcdwayne created an issue. See original summary.

sergiu stici’s picture

Status: Active » Needs review
StatusFileSize
new3.94 KB

Here is the patch, please review.

xem8vfdh’s picture

is this ready to go and be merged? If so, are we all squared away for D9 support?

xem8vfdh’s picture

Status: Needs review » Needs work

I believe there is also a composer.json change that should be made to add the Drupal 9 support badge to the module's main page, as explained here: https://www.drupal.org/project/auto_entitylabel/issues/3111526

EDIT: or perhaps the change needs to be made to the core_version_requirement field in the module's .info file. Here's an example from another project: https://www.drupal.org/files/issues/2020-03-12/3119389-d9-upgrade-2.patch

EDIT 2: my information about composer.yml and info.yml was incorrect, sorry. Apparently there is some switch the maintainer can flip to trigger the badge and mark the module as D9 compatible, but I don't know where that switch is since I am not a maintainer. Sorry.

xem8vfdh’s picture

Status: Needs work » Needs review
xem8vfdh’s picture

StatusFileSize
new712 bytes

@Sergiu Stici, when I applied you patch it resolved all of my drupal-check errors except one:

$ ./vendor/bin/drupal-check modules/content_access/
 20/20 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------------------------------------------------- 
  Line   src/Tests/ContentAccessTestHelp.php                                                                              
 ------ ----------------------------------------------------------------------------------------------------------------- 
  13     Class Drupal\content_access\Tests\ContentAccessTestHelp extends deprecated class Drupal\simpletest\WebTestBase:  
         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.                                      
  35     Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase:                                        
         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.                                      
 ------ ----------------------------------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 2 errors

I've created interdiff_1.patch to resolve that. Now:

$ ./vendor/bin/drupal-check modules/content_access/
 20/20 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
                                                                                                         
 [OK] No errors
xem8vfdh’s picture

StatusFileSize
new4.64 KB

full patch: drupal_9_deprecated_code-3042944-3.patch

xem8vfdh’s picture

  • xeM8VfDh authored 26fe906 on 8.x-1.x
    Issue #3042944 by xeM8VfDh, Sergiu Stici, gisle: Drupal 9 Deprecated...
gisle’s picture

Assigned: Unassigned » gisle
Status: Needs review » Fixed

This is fixed in the latest snapshot 8.x-1.x-dev.

If you got an email about this Issue status update, it is because you at one time (possibly a very long time ago), subscribed to it. To learn how to unsubscribe yourself, please visit: https://www.drupal.org/project/webmasters/issues/3142987

xem8vfdh’s picture

@gisle... what? I submitted this patch recently. the issue hasn't been open that long in drupal.org time. It looks like you did commit my patch, into the 8.x branch... when you said "7.x-1.x-dev" was that a typo? Apologies for the confusion.

gisle’s picture

Comment # 10 was a typo (comment #9 show it went into 8.x-1.x) - now corrected. I would never have applied cleanly to 7.x-1.x.

Thanks for the heads up.

xem8vfdh’s picture

thanks!

Status: Fixed » Closed (fixed)

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