mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-09 10:28:44 +02:00
N°9319 increase php min. version to 8.2 (#887)
* Update minimum PHP version to 8.2 * Fix previous wrong resolution of merge conflict
This commit is contained in:
7
lib/symfony/cache/Psr16Cache.php
vendored
7
lib/symfony/cache/Psr16Cache.php
vendored
@@ -18,6 +18,7 @@ use Psr\SimpleCache\CacheInterface;
|
||||
use Symfony\Component\Cache\Adapter\AdapterInterface;
|
||||
use Symfony\Component\Cache\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Cache\Traits\ProxyTrait;
|
||||
use Symfony\Contracts\Cache\ItemInterface;
|
||||
|
||||
/**
|
||||
* Turns a PSR-6 cache into a PSR-16 one.
|
||||
@@ -68,6 +69,12 @@ class Psr16Cache implements CacheInterface, PruneableInterface, ResettableInterf
|
||||
};
|
||||
self::$packCacheItem ??= \Closure::bind(
|
||||
static function (CacheItem $item) {
|
||||
// Only re-pack if there's timing metadata (for Psr16Adapter compatibility)
|
||||
// Don't re-pack if only tags metadata exists (TagAwareAdapter direct use case)
|
||||
if (!isset($item->metadata[ItemInterface::METADATA_CTIME]) && !isset($item->metadata[ItemInterface::METADATA_EXPIRY])) {
|
||||
return $item->value;
|
||||
}
|
||||
|
||||
$item->newMetadata = $item->metadata;
|
||||
|
||||
return $item->pack();
|
||||
|
||||
Reference in New Issue
Block a user