Skip to content

Move up to phpstan major version 2 #254

@phil-davis

Description

@phil-davis

phpstan 2.1.1 reports:

$ composer phpstan
> phpstan analyse lib tests
Note: Using configuration file /home/phil/git/sabre-io/http/phpstan.neon.
 40/40 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------------------------------------------------- 
  Line   lib/Auth/Digest.php                                                                                              
 ------ ----------------------------------------------------------------------------------------------------------------- 
         Ignored error pattern #^Else branch is unreachable because ternary operator condition is always true.$# in path  
         /home/phil/git/sabre-io/http/lib/Auth/Digest.php was not matched in reported errors.                             
 ------ ----------------------------------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   lib/Message.php                                                                       
 ------ -------------------------------------------------------------------------------------- 
  88     PHPDoc tag @var with type int|string|null is not subtype of native type string|null.  
         🪪  varTag.nativeType                                                                  
 ------ -------------------------------------------------------------------------------------- 

 ------ --------------------------------------------- 
  Line   lib/Sapi.php                                 
 ------ --------------------------------------------- 
  89     Loose comparison via "==" is not allowed.    
         🪪  equal.notAllowed                          
         💡 Use strict comparison via "===" instead.   
 ------ --------------------------------------------- 

 ------ --------------------------------------------- 
  Line   tests/HTTP/Auth/AWSTest.php                  
 ------ --------------------------------------------- 
  203    Loose comparison via "==" is not allowed.    
         🪪  equal.notAllowed                          
         💡 Use strict comparison via "===" instead.   
 ------ --------------------------------------------- 

 ------ --------------------------------------------- 
  Line   tests/HTTP/Auth/DigestTest.php               
 ------ --------------------------------------------- 
  169    Loose comparison via "==" is not allowed.    
         🪪  equal.notAllowed                          
         💡 Use strict comparison via "===" instead.   
 ------ --------------------------------------------- 

 ------ --------------------------------------------- 
  Line   tests/HTTP/ClientTest.php                    
 ------ --------------------------------------------- 
  540    No error to ignore is reported on line 540.  
  560    No error to ignore is reported on line 560.  
  580    No error to ignore is reported on line 580.  
 ------ --------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------------- 
  Line   tests/HTTP/RequestTest.php                                                                           
 ------ ----------------------------------------------------------------------------------------------------- 
  40     Annotation "@backupGlobals" is invalid, "@backupGlobals" should be followed by a space and a value.  
         🪪  phpunit.invalidPhpDoc                                                                             
 ------ ----------------------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 9 errors                                                                                                 
                                                                                                                        

Script phpstan analyse lib tests handling the phpstan event returned with error code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions