Description
Preconditions (*)
Install any version of Magento
Magento 2.4-develop
Steps to reproduce (*)
Implement code such as
public function __construct(
\Magento\Framework\App\CacheInterface $cache
) {
$this->cache = $cache;
}
public function doSomething($identifier)
{
$cached = $this->cache->load($identifier);
if ($cached !== false) {
}
Run a CI tool against the code (in our case Scrutinizer)
Expected result (*)
No errors reported by CI tool. Magento\Framework\App\CacheInterface
can return a bool
and this is the best way to validate if anything is in the cache (see: https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/blob/1.14.1/Cm/Cache/Backend/Redis.php#L473 / https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/blob/1.14.1/Cm/Cache/Backend/Redis.php#L488)
Actual result (*)
CI tool reports violation as Magento\Framework\App\CacheInterface::load
annotation indicates only a string
can be returned.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Pull Request In Progress