reinstall dependencies on php 7.4

This commit is contained in:
Attila Jozsef Kerekes
2022-11-14 21:15:40 +01:00
parent 8972a11c0a
commit 98401f20a2
681 changed files with 65697 additions and 9274 deletions

View File

@@ -26,21 +26,21 @@ trait AbstractAdapterTrait
use LoggerAwareTrait;
/**
* needs to be set by class, signature is function(string <key>, mixed <value>, bool <isHit>).
* @var \Closure needs to be set by class, signature is function(string <key>, mixed <value>, bool <isHit>)
*/
private static \Closure $createCacheItem;
private static $createCacheItem;
/**
* needs to be set by class, signature is function(array <deferred>, string <namespace>, array <&expiredIds>).
* @var \Closure needs to be set by class, signature is function(array <deferred>, string <namespace>, array <&expiredIds>)
*/
private static \Closure $mergeByLifetime;
private static $mergeByLifetime;
private string $namespace = '';
private int $defaultLifetime;
private string $namespaceVersion = '';
private bool $versioningIsEnabled = false;
private array $deferred = [];
private array $ids = [];
private $namespace = '';
private $defaultLifetime;
private $namespaceVersion = '';
private $versioningIsEnabled = false;
private $deferred = [];
private $ids = [];
/**
* @var int|null The maximum length to enforce for identifiers or null when no limit applies
@@ -54,28 +54,34 @@ trait AbstractAdapterTrait
*
* @return array|\Traversable
*/
abstract protected function doFetch(array $ids): iterable;
abstract protected function doFetch(array $ids);
/**
* Confirms if the cache contains specified cache item.
*
* @param string $id The identifier for which to check existence
*
* @return bool
*/
abstract protected function doHave(string $id): bool;
abstract protected function doHave(string $id);
/**
* Deletes all items in the pool.
*
* @param string $namespace The prefix used for all identifiers managed by this pool
*
* @return bool
*/
abstract protected function doClear(string $namespace): bool;
abstract protected function doClear(string $namespace);
/**
* Removes multiple items from the pool.
*
* @param array $ids An array of identifiers that should be removed from the pool
*
* @return bool
*/
abstract protected function doDelete(array $ids): bool;
abstract protected function doDelete(array $ids);
/**
* Persists several cache items immediately.
@@ -85,12 +91,14 @@ trait AbstractAdapterTrait
*
* @return array|bool The identifiers that failed to be cached or a boolean stating if caching succeeded or not
*/
abstract protected function doSave(array $values, int $lifetime): array|bool;
abstract protected function doSave(array $values, int $lifetime);
/**
* {@inheritdoc}
*
* @return bool
*/
public function hasItem(mixed $key): bool
public function hasItem($key)
{
$id = $this->getId($key);
@@ -109,8 +117,10 @@ trait AbstractAdapterTrait
/**
* {@inheritdoc}
*
* @return bool
*/
public function clear(string $prefix = ''): bool
public function clear(string $prefix = '')
{
$this->deferred = [];
if ($cleared = $this->versioningIsEnabled) {
@@ -148,16 +158,20 @@ trait AbstractAdapterTrait
/**
* {@inheritdoc}
*
* @return bool
*/
public function deleteItem(mixed $key): bool
public function deleteItem($key)
{
return $this->deleteItems([$key]);
}
/**
* {@inheritdoc}
*
* @return bool
*/
public function deleteItems(array $keys): bool
public function deleteItems(array $keys)
{
$ids = [];
@@ -170,7 +184,7 @@ trait AbstractAdapterTrait
if ($this->doDelete($ids)) {
return true;
}
} catch (\Exception) {
} catch (\Exception $e) {
}
$ok = true;
@@ -195,7 +209,7 @@ trait AbstractAdapterTrait
/**
* {@inheritdoc}
*/
public function getItem(mixed $key): CacheItem
public function getItem($key)
{
$id = $this->getId($key);
@@ -222,7 +236,7 @@ trait AbstractAdapterTrait
/**
* {@inheritdoc}
*/
public function getItems(array $keys = []): iterable
public function getItems(array $keys = [])
{
$ids = [];
$commit = false;
@@ -249,8 +263,10 @@ trait AbstractAdapterTrait
/**
* {@inheritdoc}
*
* @return bool
*/
public function save(CacheItemInterface $item): bool
public function save(CacheItemInterface $item)
{
if (!$item instanceof CacheItem) {
return false;
@@ -262,8 +278,10 @@ trait AbstractAdapterTrait
/**
* {@inheritdoc}
*
* @return bool
*/
public function saveDeferred(CacheItemInterface $item): bool
public function saveDeferred(CacheItemInterface $item)
{
if (!$item instanceof CacheItem) {
return false;
@@ -283,7 +301,7 @@ trait AbstractAdapterTrait
*
* @return bool the previous state of versioning
*/
public function enableVersioning(bool $enable = true): bool
public function enableVersioning(bool $enable = true)
{
$wasEnabled = $this->versioningIsEnabled;
$this->versioningIsEnabled = $enable;
@@ -305,7 +323,10 @@ trait AbstractAdapterTrait
$this->ids = [];
}
public function __sleep(): array
/**
* @return array
*/
public function __sleep()
{
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
}
@@ -344,7 +365,7 @@ trait AbstractAdapterTrait
}
}
private function getId(mixed $key)
private function getId($key)
{
if ($this->versioningIsEnabled && '' === $this->namespaceVersion) {
$this->ids = [];