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

tool changes #247

Merged
merged 3 commits into from
Sep 6, 2024
Merged

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Sep 6, 2024

  • apply php-cs-fixer 3.64 changes
  • add PHP 8.4 to CI
  • ignore phpstan reports about superfluous code - these are about code paths that phpstan knows are never taken. They do no harm. For now, I will ignore these phpstan reports, and leave the "protective but unnecessary" code

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

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@phil-davis
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@phil-davis phil-davis marked this pull request as ready for review September 6, 2024 10:24
@phil-davis phil-davis merged commit 280ee79 into sabre-io:master Sep 6, 2024
8 checks passed
@phil-davis phil-davis deleted the tool-changes-20240906 branch September 6, 2024 11:30
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 this pull request may close these issues.

2 participants