Drupal 10 compatibility for User Points

Created on 9 October 2022, about 2 years ago
Updated 9 November 2023, about 1 year ago

There are a few D10 compatibility issues reported by drupal-check:

 ------ --------------------------------------------------------------------- 
  Line   src/Controller/UserPointsController.php                              
 ------ --------------------------------------------------------------------- 
  90     Call to an undefined method                                          
         Drupal\Core\Entity\EntityInterface::getRevisionCreationTime().       
  115    Call to an undefined method                                          
         Drupal\Core\Entity\EntityStorageInterface::revisionIds().            
  121    PHPDoc tag @var for variable $revision contains unknown class        
         Drupal\userpoints\UserPointsInterface.                               
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
  125    Call to method getRevisionUser() on an unknown class                 
         Drupal\userpoints\UserPointsInterface.                               
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
  129    Call to method getRevisionCreationTime() on an unknown class         
         Drupal\userpoints\UserPointsInterface.                               
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
  131    Call to an undefined method                                          
         Drupal\userpoints\Controller\UserPointsController::l().              
  137    Call to an undefined method                                          
         Drupal\userpoints\Entity\UserPointsInterface::link().                
  149    Call to method getRevisionLogMessage() on an unknown class           
         Drupal\userpoints\UserPointsInterface.                               
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
 ------ --------------------------------------------------------------------- 

 ------ -------------------------------------------- 
  Line   src/Entity/UserPoints.php                   
 ------ -------------------------------------------- 
  114    Call to an undefined method                 
         Drupal\Core\Entity\EntityInterface::get().  
 ------ -------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Form/UserPointsForm.php                                         
 ------ -------------------------------------------------------------------- 
  109    Method Drupal\userpoints\Form\UserPointsForm::save() should return  
         int but return statement is missing.                                
 ------ -------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   src/Form/UserPointsRevisionDeleteForm.php                            
 ------ --------------------------------------------------------------------- 
  77     Function format_date not found.                                      
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
  112    Function format_date not found.                                      
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
 ------ --------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Form/UserPointsSettingsForm.php                                 
 ------ -------------------------------------------------------------------- 
  118    Method Drupal\Core\Config\Config::get() invoked with 2 parameters,  
         0-1 required.                                                       
  120    Cannot call method getBundleInfo() on array.                        
 ------ -------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------- 
  Line   src/Form/UserPointsTypeForm.php                                  
 ------ ----------------------------------------------------------------- 
  67     Method Drupal\userpoints\Form\UserPointsTypeForm::save() should  
         return int but return statement is missing.                      
 ------ ----------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   src/Form/UserpointsEntityTabForm.php                                  
 ------ ---------------------------------------------------------------------- 
  96     PHPDoc tag @param for parameter $entity with type                     
         Drupal\userpoints\Form\Drupal\Core\Entity\EntityInterface is not      
         subtype of native type Drupal\Core\Entity\EntityInterface.            
  96     Parameter $entity of method                                           
         Drupal\userpoints\Form\UserpointsEntityTabForm::getTypesAccess() has  
         invalid type                                                          
         Drupal\userpoints\Form\Drupal\Core\Entity\EntityInterface.            
  152    PHPDoc tag @param for parameter $entity with type                     
         Drupal\userpoints\Form\Drupal\Core\Entity\EntityInterface is not      
         subtype of native type Drupal\Core\Entity\EntityInterface|null.       
  152    Parameter $entity of method                                           
         Drupal\userpoints\Form\UserpointsEntityTabForm::doBuildForm() has     
         invalid type                                                          
         Drupal\userpoints\Form\Drupal\Core\Entity\EntityInterface.            
 ------ ---------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   src/Form/UserpointsNodeTabForm.php                                     
 ------ ----------------------------------------------------------------------- 
  33     PHPDoc tag @param for parameter $node with type                        
         Drupal\userpoints\Form\Drupal\node\NodeInterface is not subtype of     
         native type Drupal\node\NodeInterface|null.                            
  33     Parameter $node of method                                              
         Drupal\userpoints\Form\UserpointsNodeTabForm::buildForm() has invalid  
         type Drupal\userpoints\Form\Drupal\node\NodeInterface.                 
 ------ ----------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   src/Form/UserpointsUserTabForm.php                                     
 ------ ----------------------------------------------------------------------- 
  33     PHPDoc tag @param for parameter $user with type                        
         Drupal\userpoints\Form\Drupal\user\UserInterface is not subtype of     
         native type Drupal\user\UserInterface|null.                            
  33     Parameter $user of method                                              
         Drupal\userpoints\Form\UserpointsUserTabForm::buildForm() has invalid  
         type Drupal\userpoints\Form\Drupal\user\UserInterface.                 
 ------ ----------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   src/Service/UserPointsService.php                                      
 ------ ----------------------------------------------------------------------- 
  41     Property                                                               
         Drupal\userpoints\Service\UserPointsService::$eventDispatcher has      
         unknown class                                                          
         Drupal\userpoints\Service\Symfony\Component\EventDispatcher\EventDisp  
         atcherInterface as its type.                                           
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols     
  113    Call to an undefined method                                            
         Drupal\Core\Entity\Sql\SqlEntityStorageInterface::revisionIds().       
  114    Call to an undefined method                                            
         Drupal\Core\Entity\Sql\SqlEntityStorageInterface::loadMultipleRevisio  
         ns().                                                                  
  162    Instantiation of deprecated class                                      
         Symfony\Component\EventDispatcher\Event:                               
         since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event"       
         instead                                                                
  163    Access to an undefined property                                        
         Symfony\Component\EventDispatcher\Event::$points.                      
  164    Access to an undefined property                                        
         Symfony\Component\EventDispatcher\Event::$quantity.                    
  165    Access to an undefined property                                        
         Symfony\Component\EventDispatcher\Event::$log.                         
  166    Call to method dispatch() on an unknown class                          
         Drupal\userpoints\Service\Symfony\Component\EventDispatcher\EventDisp  
         atcherInterface.                                                       
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols     
  208    Instantiation of deprecated class                                      
         Symfony\Component\EventDispatcher\Event:                               
         since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event"       
         instead                                                                
  209    Access to an undefined property                                        
         Symfony\Component\EventDispatcher\Event::$sourcePoints.                
  210    Access to an undefined property                                        
         Symfony\Component\EventDispatcher\Event::$targetPoints.                
  211    Access to an undefined property                                        
         Symfony\Component\EventDispatcher\Event::$quantity.                    
  212    Access to an undefined property                                        
         Symfony\Component\EventDispatcher\Event::$log.                         
  213    Call to method dispatch() on an unknown class                          
         Drupal\userpoints\Service\Symfony\Component\EventDispatcher\EventDisp  
         atcherInterface.                                                       
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols     
  238    Call to an undefined method                                            
         Drupal\aggregator\Entity\Feed::setRevisionLogMessage().                
 ------ ----------------------------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/UserPointsAccessControlHandler.php             
 ------ --------------------------------------------------- 
  39     Call to an undefined method                        
         Drupal\Core\Entity\EntityInterface::getOwnerId().  
 ------ --------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   src/UserPointsHtmlRouteProvider.php                                    
 ------ ----------------------------------------------------------------------- 
  58     Method                                                                 
         Drupal\userpoints\UserPointsHtmlRouteProvider::getHistoryRoute()       
         should return Symfony\Component\Routing\Route|null but return          
         statement is missing.                                                  
  82     Method                                                                 
         Drupal\userpoints\UserPointsHtmlRouteProvider::getRevisionRoute()      
         should return Symfony\Component\Routing\Route|null but return          
         statement is missing.                                                  
  106    Method                                                                 
         Drupal\userpoints\UserPointsHtmlRouteProvider::getRevisionRevertRoute  
         () should return Symfony\Component\Routing\Route|null but return       
         statement is missing.                                                  
  130    Method                                                                 
         Drupal\userpoints\UserPointsHtmlRouteProvider::getRevisionDeleteRoute  
         () should return Symfony\Component\Routing\Route|null but return       
         statement is missing.                                                  
  154    Method                                                                 
         Drupal\userpoints\UserPointsHtmlRouteProvider::getSettingsFormRoute()  
         should return Symfony\Component\Routing\Route|null but return          
         statement is missing.                                                  
 ------ ----------------------------------------------------------------------- 

 ------ -------------------------------------------- 
  Line   src/UserPointsTypeListBuilder.php           
 ------ -------------------------------------------- 
  28     Call to an undefined method                 
         Drupal\Core\Entity\EntityInterface::get().  
 ------ -------------------------------------------- 

 ------ ----------------------------------------------------------------- 
  Line   userpoints.module                                                
 ------ ----------------------------------------------------------------- 
  14     Function userpoints_help() should return string|null but return  
         statement is missing.                                            
 ------ ----------------------------------------------------------------- 

 [ERROR] Found 46 errors                                                        
📌 Task
Status

Needs review

Version

2.0

Component

Other

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