Repository navigation
add phpdoc return types for arrayaccess methods (fixes #563) - #707
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 4.5 #707 +/- ##
=========================================
Coverage 98.58% 98.58%
Complexity 1931 1931
=========================================
Files 71 71
Lines 5507 5507
=========================================
Hits 5429 5429
Misses 78 78 ☔ View full report in Codecov by Sentry. |
|
@smhg php-cs-fixer wants an extra comment line between And this will not change run-time behavior. I suppose that the messages reported in issue #563 are being generated by the analysis tools, and not run-time in production? |
|
@phil-davis I've added the extra lines to the phpdoc blocks. I'm sorry, trusted CI would run php-cs-fixer as it requires an older PHP env. The warnings in #563 are shown by PHPUnit only (v9 in my case). I tried to make the minimal required change to close the issue. I was unsure adding a real return value would not add any complexities on older supported PHP versions for instance. I reasoned it should only be a patch release. |
|
I will have a look at what else is waiting for 4.5 branch and hopefully make the next patch release later today. |
|
Thanks @phil-davis! Now I also remember I tried to bump phpstan's level to detect these deprecation warnings, but I realized that is probably what's going on in the main branch? That's not worth the effort in v4 I assumed? |
Yes, I was making progress on increasing the phpstan level in the master branch. I did it easily in the smaller sabre-io repos, but it is a lot more effort here in vobject, so I lost enthusiasm! But some day I would like that to get finished, and release it as a new major version (because it is likely that explicitly declaring parameter and return types will result in some technical backward-compatibility breaks) So contributions for phpstan enhancements are welcome and go to the master branch. |
|
FWIW I now noticed a package called I'm sorry about the distraction. I'll add a message how to disable these in the original issue. |
See #563.
This adds only phpdoc return types as real return types would not work for the earlier php versions this library supports.