Drupal 10 compatibility for User Badges

Created on 10 October 2022, about 2 years ago
Updated 24 September 2024, about 2 months ago

Running drupal-check on the codebase shows the following:

 ------ -------------------------------------------------------- 
  Line   src/BadgeListBuilder.php                                
 ------ -------------------------------------------------------- 
  90     Access to an undefined property                         
         Drupal\Core\Entity\EntityInterface::$image.             
  94     Access to an undefined property                         
         Drupal\Core\Entity\EntityInterface::$image.             
  102    Call to an undefined method                             
         Drupal\Core\Entity\EntityInterface::getBadgeWeight().   
  104    Call to an undefined method                             
         Drupal\Core\Entity\EntityInterface::getBadgeRoleIds().  
 ------ -------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   src/Controller/BadgeController.php                                   
 ------ --------------------------------------------------------------------- 
  38     PHPDoc tag @param has invalid value                                  
         (\Drupal\Core\Utility\LinkGeneratorInterface linkGenerator           
           Link generator service.): Unexpected token "linkGenerator",        
         expected variable at offset 107                                      
  56     PHPDoc tag @return has invalid value ([]                             
           Return links for badge creation.): Unexpected token "[", expected  
         type at offset 36                                                    
 ------ --------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   src/Controller/UserBadgesListBuilder.php                             
 ------ --------------------------------------------------------------------- 
  38     Property Drupal\user_badges\Controller\UserBadgesListBuilder::$user  
         has unknown class Drupal\user\User as its type.                      
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols   
 ------ --------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------ 
  Line   src/Entity/Badge.php                                              
 ------ ------------------------------------------------------------------ 
  97     Access to an undefined property                                   
         Drupal\Core\Field\FieldItemInterface::$target_id.                 
  110    Method Drupal\user_badges\Entity\Badge::setBadgeRoleId() should   
         return Drupal\user_badges\BadgeInterface but return statement is  
         missing.                                                          
 ------ ------------------------------------------------------------------ 

 ------ ----------------------------------------------------------------------- 
  Line   src/Entity/Form/BadgeForm.php                                          
 ------ ----------------------------------------------------------------------- 
  45     Call to an undefined static method                                     
         Drupal\Core\Entity\ContentEntityForm::submit().                        
  69     Method Drupal\user_badges\Entity\Form\BadgeForm::save() should return  
         int but return statement is missing.                                   
 ------ ----------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Form/BadgeTypeForm.php                                          
 ------ -------------------------------------------------------------------- 
  69     Method Drupal\user_badges\Form\BadgeTypeForm::save() should return  
         int but return statement is missing.                                
 ------ -------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Plugin/RulesAction/AssignBadge.php                              
 ------ -------------------------------------------------------------------- 
  36     Parameter $account of method                                        
         Drupal\user_badges\Plugin\RulesAction\AssignBadge::doexecute() has  
         invalid type Drupal\user_badges\Plugin\RulesAction\UserInterface.   
 ------ -------------------------------------------------------------------- 

 [ERROR] Found 13 errors                                                        
πŸ“Œ Task
Status

Needs review

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024