sabre-io / xml

sabre/xml is an XML library that you may not hate.
http://sabre.io/xml/
BSD 3-Clause "New" or "Revised" License
515 stars 77 forks source link

Bump dependency versions #238

Closed phil-davis closed 1 year ago

phil-davis commented 1 year ago

Adjust PHP doc etc. so that the latest php-cs-fixer and phpstan will pass. Mostly cs-fixer removed various mixed type declarations for var, param, return. But then phpstan complained about things having their type declaration missing!

One workaround is to also put a description at the end of the type declaration. So I did that in some places.

I also specified the type better in one place.

codecov[bot] commented 1 year ago

Codecov Report

Merging #238 (daef901) into master (c508c1f) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #238   +/-   ##
=========================================
  Coverage     96.90%   96.90%           
  Complexity      116      116           
=========================================
  Files            13       13           
  Lines           485      485           
=========================================
  Hits            470      470           
  Misses           15       15           
Impacted Files Coverage Δ
lib/Deserializer/functions.php 89.69% <ø> (ø)
lib/Element/Base.php 100.00% <ø> (ø)
lib/Service.php 98.59% <ø> (ø)
lib/Writer.php 100.00% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

phil-davis commented 1 year ago

cs-fixer wants to remove return mixed from the PHP doc. I guess return mixed is not a helpful thing - I will look for where this started happening in cs-fixer releases.

Edit: the no_superfluous_phpdoc_tags rule makes this happen. I suppose that rule has been enabled now for the @Symfony cs-fixer rule-set.

staabm commented 1 year ago

return mixed is not adding information, but makes the return type obvious/explicit.

I have no particular opinion whether we should keep it or not.

phil-davis commented 1 year ago

After php-cs-fixer removes the "return mixed", then phpstan complains that the function has no return type specified!

I can get around this by writing some text description about the "return mixed" -

phil-davis commented 1 year ago

I have rebased and got cs-fixer etc passing again. I will have a look at the review comments again in an hour or 2. Maybe this can all be sorted out today, and we can get on with more stuff.

phil-davis commented 1 year ago

@staabm IMO this is the best we can do for now. Please review again.