Open phil-davis opened 11 months ago
Attention: 2 lines
in your changes are missing coverage. Please review.
Comparison is base (
be1f12e
) 98.75% compared to head (a6a2ef8
) 97.59%. Report is 1 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
lib/Apcu.php | 77.77% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
with phpstan level 3 it correctly detects that setMultiple and deleteMultiple must only return boolean.
https://github.com/php-fig/simple-cache/pull/24 explicitly added the boolean return type to these methods, released in major version 3. That was released for PHP 8.
But we currently support PHP 7.4 also. That causes
psr/simple-cache
major version 1 to still be used. That declares the return type only in PHPdoc (which phpstan is finding).Probably the current code works fine if someone is checking for an array in the return value, and processing it to find out what went wrong (if anything). So the change in this PR would break that. PHP 7.4 is not going to fall over at run-time just because setMultiple or deleteMultiple returns something not declared in the PHP doc.
So I will leave this here for now - probably better to sort this out with a major version some day, along with dropping PHP 7.4 support and bringing in
psr/simple-cache
v2 and then v3.Also should have unit tests that check the return value.