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:
jf-cbd
2026-04-20 14:47:44 +02:00
committed by GitHub
parent f439490bfc
commit 805087a01b
171 changed files with 5629 additions and 1446 deletions

View File

@@ -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();