Problem/Motivation

drupal-check results on commit hash:
source : [git] https://git.drupal.org/project/context ea6051a4919177397ca6685381e9b35ac3bd547b
source : https://github.com/oddhill/context


 

 ------ --------------------------------------------------- 
  Line   modules/context_ui/src/ContextListBuilder.php      
 ------ --------------------------------------------------- 
  162    Call to deprecated method urlInfo() of class       
         Drupal\Core\Entity\EntityInterface.                
  166    Call to deprecated method urlInfo() of class       
         Drupal\Core\Entity\EntityInterface.                
  260    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ ----------------------------------------------------------- 
  Line   modules/context_ui/src/Controller/ContextUIController.php  
 ------ ----------------------------------------------------------- 
  323    Call to deprecated method urlInfo() of class               
         Drupal\Core\Entity\EntityInterface.                        
  389    Call to deprecated method urlInfo() of class               
         Drupal\Core\Entity\EntityInterface.                        
 ------ ----------------------------------------------------------- 

 ------ ----------------------------------------------------- 
  Line   modules/context_ui/src/Form/ConditionDeleteForm.php  
 ------ ----------------------------------------------------- 
  75     Call to deprecated method urlInfo() of class         
         Drupal\Core\Config\Entity\ConfigEntityBase.          
  118    Call to deprecated function drupal_set_message().    
 ------ ----------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   modules/context_ui/src/Form/ContextAddForm.php     
 ------ --------------------------------------------------- 
  16     Call to deprecated function drupal_set_message().  
  21     Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   modules/context_ui/src/Form/ContextDeleteForm.php  
 ------ --------------------------------------------------- 
  73     Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ ---------------------------------------------------- 
  Line   modules/context_ui/src/Form/ContextDisableForm.php  
 ------ ---------------------------------------------------- 
  82     Call to deprecated function drupal_set_message().   
 ------ ---------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   modules/context_ui/src/Form/ContextEditForm.php    
 ------ --------------------------------------------------- 
  62     Call to deprecated function drupal_set_message().  
  67     Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ ---------------------------------------------------- 
  Line   modules/context_ui/src/Form/ReactionDeleteForm.php  
 ------ ---------------------------------------------------- 
  72     Call to deprecated method urlInfo() of class        
         Drupal\Core\Entity\EntityInterface.                 
  120    Call to deprecated function drupal_set_message().   
 ------ ---------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Reaction/Blocks/Form/BlockDeleteForm.php       
 ------ --------------------------------------------------- 
  87     Call to deprecated method urlInfo() of class       
         Drupal\Core\Entity\EntityInterface.                
  128    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 [ERROR] Found 17 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
new8.74 KB

Here is the patch, please review.

strozx’s picture

StatusFileSize
new10.17 KB

I have reviewed and saw that drupal_set_message() in ContextDeleteForm.php was not updated so I updated it and here is the patch.

strozx’s picture

StatusFileSize
new11.2 KB

There was still one deprecated bit of code in there

bzoks’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #4 solves all issues reported by drupal-check, project features it touches still work as expected on D8.7

lisa.rae’s picture

StatusFileSize
new13.07 KB

With the release of Drupal 9 beta and resulting updates to deprecated code, there are new D9 Compatibility issues:

43/43 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------------------------- 
  Line   src/Plugin/ContextReaction/Blocks.php                                                    
 ------ ----------------------------------------------------------------------------------------- 
  698    Call to deprecated constant REGIONS_ALL: Deprecated in drupal:8.3.0 and is removed from  
         drupal:9.0.0. Use \Drupal\block\BlockRepositoryInterface::REGIONS_ALL instead.           
 ------ ----------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------- 
  Line   src/Plugin/ContextReaction/Regions.php                                                   
 ------ ----------------------------------------------------------------------------------------- 
  159    Call to deprecated constant REGIONS_ALL: Deprecated in drupal:8.3.0 and is removed from  
         drupal:9.0.0. Use \Drupal\block\BlockRepositoryInterface::REGIONS_ALL instead.           
 ------ ----------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------- 
  Line   src/Reaction/Blocks/Form/BlockFormBase.php                                               
 ------ ----------------------------------------------------------------------------------------- 
  344    Call to deprecated constant REGIONS_ALL: Deprecated in drupal:8.3.0 and is removed from  
         drupal:9.0.0. Use \Drupal\block\BlockRepositoryInterface::REGIONS_ALL instead.           
 ------ ----------------------------------------------------------------------------------------- 

Rerolled patch from #4 to include new issues. Patch attached.

lisa.rae’s picture

Status: Reviewed & tested by the community » Needs review
nace_fr’s picture

Status: Needs review » Reviewed & tested by the community

Patch from #6 solves all issues reported by drupal-check. Changing status to RTBC.

boshtian’s picture

ngkoutsaik’s picture

Status: Reviewed & tested by the community » Needs work

The patch failed to apply and I had to reroll it.

Additionally I got an error when scanning it with status update.

80 Call to deprecated method getStorage() of class Drupal\Core\Entity\EntityManager. Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() instead.

ngkoutsaik’s picture

Status: Needs work » Needs review
StatusFileSize
new13.57 KB
new1.04 KB

The rerolled and updated patch with the additional fix.

kbrodej’s picture

StatusFileSize
new14.11 KB
new3.19 KB

Hi.

Reviewed the patch from #11. Patch applied cleanly.

However I did remove empty class docblocks which were added in #4 which should be solved in Coding standards issue.

Also I replaced qualifiers for BlockRepositoryInterface with imports.

ngkoutsaik’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

thanks for updating the patch. I tested yours and it applied cleanly.

  • boshtian committed 45c52bc on 8.x-4.x authored by kbrodej
    Issue #3042764 by strozx, ngkoutsaik, kbrodej, lhridley, Sergiu Stici,...
boshtian’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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