RikudouSage / DynamoDbCachePsr6

PSR-6 and PSR-16 cache implementation using AWS DynamoDB
MIT License
6 stars 4 forks source link

Deprecated conversion from float to int #17

Closed chekalsky closed 2 years ago

chekalsky commented 2 years ago

Getting this error on PHP 8.1

Deprecated: Implicit conversion from float 1638914291.287998 to int loses precision

here

            $value = $reflectionExpiry->getValue($cacheItem);
            if ($value === null) {
                $expiry = null;
            } else {
                $expiry = new DateTime();
                $expiry->setTimestamp($value); ⬅️
            }
            // @codeCoverageIgnoreStart
RikudouSage commented 2 years ago

I assume it's from here?

https://github.com/RikudouSage/DynamoDbCachePsr6Bundle/blob/master/src/Converter/SymfonyCacheItemConverter.php#L50