Configuration
- PhpFastCache version: 8.0.2
- PhpFastCache API version: 3.0.0
- PHP version: PHP 7.4.11 (cli) (built: Sep 29 2020 13:18:06) ( ZTS Visual C++ 2017 x64 )
- Operating system: Windows 10 Pro (Version: 10.0.18363 Build 18363)
Describe the bug
Not a functional bug, but psalm insists that the 3rd parameter in Phpfastcache\Helper\Psr16Adapter::set has to be null.
When I run psalm, it throws this error
ERROR: InvalidArgument - src\SFCache.php:88:38 - Argument 3 of Phpfastcache\Helper\Psr16Adapter::set expects null, int provided (see https://psalm.dev/004)
$inst->set($key, $value, $ttl);
where $inst is my Cache instance
To Reproduce
Steps to reproduce the behavior:
- Use
Psr16Adapter::set with 3rd parameter set
- Run psalm with default configuration
- Encounter the error above
Expected behavior
Psalm should not recognize this or similar errors.
Possible solution
Changing https://github.com/PHPSocialNetwork/phpfastcache/blob/99a345aae21f1c6d54955f8bbb622f3fba39a322/lib/Phpfastcache/Helper/Psr16Adapter.php#L93 to
solves this problem.
Configuration
Describe the bug
Not a functional bug, but psalm insists that the 3rd parameter in
Phpfastcache\Helper\Psr16Adapter::sethas to benull.When I run psalm, it throws this error
where
$instis my Cache instanceTo Reproduce
Steps to reproduce the behavior:
Psr16Adapter::setwith 3rd parameter setExpected behavior
Psalm should not recognize this or similar errors.
Possible solution
Changing https://github.com/PHPSocialNetwork/phpfastcache/blob/99a345aae21f1c6d54955f8bbb622f3fba39a322/lib/Phpfastcache/Helper/Psr16Adapter.php#L93 to
solves this problem.