Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump phpstan to major version 2 #304

Open
phil-davis opened this issue Dec 2, 2024 · 0 comments · May be fixed by #305
Open

Bump phpstan to major version 2 #304

phil-davis opened this issue Dec 2, 2024 · 0 comments · May be fixed by #305

Comments

@phil-davis
Copy link
Contributor

It reports:

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

 ------ ----------------------------------------------------------------------------- 
  Line   lib/Serializer/functions.php                                                 
 ------ ----------------------------------------------------------------------------- 
  184    Call to function is_string() with string will always evaluate to true.       
         🪪  function.alreadyNarrowedType                                              
  202    Call to function is_object() with object will always evaluate to true.       
         🪪  function.alreadyNarrowedType                                              
         💡 Remove remaining cases below this one and this error will disappear too.   
  204    Call to function is_null() with *NEVER* will always evaluate to true.        
         🪪  function.alreadyNarrowedType                                              
 ------ ----------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------------------------------- 
  Line   tests/Sabre/Xml/ReaderTest.php                                                                                         
 ------ ----------------------------------------------------------------------------------------------------------------------- 
  342    Call to static method PHPUnit\Framework\Assert::assertIsArray() with array<LibXMLError> will always evaluate to true.  
         🪪  staticMethod.alreadyNarrowedType                                                                                    
 ------ ----------------------------------------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------------------------------------------- 
  Line   tests/Sabre/Xml/ServiceTest.php                                                                                                  
 ------ --------------------------------------------------------------------------------------------------------------------------------- 
  189    Call to static method PHPUnit\Framework\Assert::assertIsObject() with Sabre\Xml\PropFindTestAsset will always evaluate to true.  
         🪪  staticMethod.alreadyNarrowedType                                                                                              
         💡 Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your      
            phpstan.neon.                                                                                                                 
 ------ --------------------------------------------------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 5 errors                                                                                                 
                                                                                                                        

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

ToDo: sort out the above so it passes.

@phil-davis phil-davis linked a pull request Dec 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant