Problem/Motivation

phpstan update makes our workarounds into errors :/

 ------ ----------------------------------------------------------------------- 
  Line   submodules/apns_php_integration/tests/src/Kernel/ApnsResponsePrunerTe  
         st.php                                                                 
 ------ ----------------------------------------------------------------------- 
  103    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  103    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  126    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  126    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   submodules/firebase_php_integration/src/Form/FirebasePhpIntegrationSe  
         ndMessageSingleUserForm.php                                            
 ------ ----------------------------------------------------------------------- 
  25     Direct injection of entity storage via $userStorage is not             
         recommended. Inject Drupal\Core\Entity\EntityTypeManagerInterface and  
         call getStorage() at the call-site instead.                            
         🪪  drupal.entityStorageDirectInjection                                
         💡  See                                                                
         https://mglaman.dev/blog/dependency-injection-anti-patterns-drupal     
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   submodules/firebase_php_integration/tests/src/Kernel/FirebasePhpInteg  
         rationHooksTest.php                                                    
 ------ ----------------------------------------------------------------------- 
  59     Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  59     Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  97     Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  97     Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  118    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  118    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   submodules/firebase_php_integration/tests/src/Kernel/FirebasePhpInteg  
         rationSendMessageSingleUserFormTest.php                                
 ------ ----------------------------------------------------------------------- 
  104    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  104    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  128    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  128    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  148    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  148    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  171    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  171    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  191    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  191    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   submodules/firebase_php_integration/tests/src/Kernel/RegistrationToke  
         nValidateActionTest.php                                                
 ------ ----------------------------------------------------------------------- 
  93     Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  93     Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  114    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  114    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  135    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  135    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  160    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  160    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  182    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  182    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  204    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  204    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  222    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  222    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  261    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  261    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  277    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  277    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  286    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  286    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
  294    Call to function assert() with true will always evaluate to true.      
         🪪  function.alreadyNarrowedType                                       
  294    Instanceof between Drupal\user\UserInterface and                       
         Drupal\user\UserInterface will always evaluate to true.                
         🪪  instanceof.alwaysTrue                                              
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   tests/src/Kernel/ConfigValidationTest.php                              
 ------ ----------------------------------------------------------------------- 
  55     Dynamic call to static method                                          
         PHPUnit\Framework\Assert::assertFalse().                               
         🪪  staticMethod.dynamicCall                                           
  62     Dynamic call to static method PHPUnit\Framework\Assert::assertSame().  
         🪪  staticMethod.dynamicCall                                           
 ------ ----------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------- 
  Line   tests/src/Kernel/RegistrationTokenAccessTest.php                   
 ------ ------------------------------------------------------------------- 
  77     Call to function assert() with true will always evaluate to true.  
         🪪  function.alreadyNarrowedType                                   
  77     Instanceof between Drupal\user\UserInterface and                   
         Drupal\user\UserInterface will always evaluate to true.            
         🪪  instanceof.alwaysTrue                                          
 ------ ------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   tests/src/Kernel/RegistrationTokenKernelTestBase.php                 
 ------ --------------------------------------------------------------------- 
  68     Storing entity storage as a class property is not recommended. Call  
         Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() at the   
         call-site instead.                                                   
         🪪  drupal.entityStoragePropertyAssignment                           
         💡  See                                                              
         https://mglaman.dev/blog/dependency-injection-anti-patterns-drupal   
 ------ --------------------------------------------------------------------- 
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ptmkenny created an issue. See original summary.

  • ptmkenny committed 2608c300 on 1.0.x
    task: #3611627 Fix phpstan issues
    
    By: ptmkenny
    
ptmkenny’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.