sabre-io / http

The sabre/http library provides utilities for dealing with http requests and responses.
http://sabre.io/http/
BSD 3-Clause "New" or "Revised" License
187 stars 62 forks source link

tool changes #247

Closed phil-davis closed 1 month ago

phil-davis commented 1 month ago

There are no more "Implicitly marking parameter $xxx as nullable is deprecated" code to be fixed.

The executable code changes in this PR are just what php-cs-fixer 3.64 wants to do.

I can make a new 7.0.4 release after this, that officially supports PHP 8.4

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.17%. Comparing base (708401f) to head (4eb36d1). Report is 5 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #247 +/- ## ========================================= Coverage 94.17% 94.17% Complexity 261 261 ========================================= Files 15 15 Lines 875 875 ========================================= Hits 824 824 Misses 51 51 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

phil-davis commented 1 month ago

phpstan reports:

------ ---------------------------------------------------------------------------------------------------------------- 
  Line   lib/Auth/Digest.php                                                                                             
 ------ ---------------------------------------------------------------------------------------------------------------- 
  203    Else branch is unreachable because ternary operator condition is always true.                                   
         💡 Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain:   
            false in your phpstan.neon.                                                                                  
  203    Strict comparison using !== between '' and non-empty-string will always evaluate to true.                       
         💡 Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain:   
            false in your phpstan.neon.                                                                                  
 ------ ---------------------------------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------------------------------------- 
  Line   lib/functions.php                                                                                                           
 ------ ---------------------------------------------------------------------------------------------------------------------------- 
  259    Offset 'value' on array{0: string, name: non-empty-string, 1: non-empty-string, value: string, 2: string, 3: 'ignored'} in  
         isset() always exists and is not nullable.                                                                                  
 ------ ---------------------------------------------------------------------------------------------------------------------------- 

 [ERROR] Found 3 errors
phil-davis commented 1 month ago

Unit tests on PHP 8.4:

PHPUnit 9.6.20 by Sebastian Bergmann and contributors.

...............................................................  63 / 168 ( 37%)
............................................................... 126 / 168 ( 75%)
...........ES.SSSSSSSSSSSSSSSSSSSS........                      168 / 168 (100%)

Time: 00:05.940, Memory: 73.99 MB

There was 1 error:

1) Sabre\HTTP\SapiTest::testSend
PHPUnit\Framework\Exception: PHP Deprecated:  Sabre\Event\Loop\instance(): Implicitly marking parameter $newLoop as nullable is deprecated, the explicit nullable type must be used instead in /home/runner/work/http/http/vendor/sabre/event/lib/Loop/functions.php on line 137
Deprecated: Sabre\Event\Loop\instance(): Implicitly marking parameter $newLoop as nullable is deprecated, the explicit nullable type must be used instead in /home/runner/work/http/http/vendor/sabre/event/lib/Loop/functions.php on line 137

ERRORS!
Tests: 168, Assertions: 285, Errors: 1, Skipped: 21.

I need to sort out https://github.com/sabre-io/event first, and have a release that has fixed the "nullable type deprecated" thing.

phil-davis commented 1 month ago

https://github.com/sabre-io/event/releases/tag/6.0.1 has been released. CI finds that now, and passes.