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

@@ -39,9 +39,9 @@ class MemcachedAdapter extends AbstractAdapter
\Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_PHP,
];
private MarshallerInterface $marshaller;
private \Memcached $client;
private \Memcached $lazyClient;
private $marshaller;
private $client;
private $lazyClient;
/**
* Using a MemcachedAdapter with a TagAwareAdapter for storing tags is discouraged.
@@ -90,9 +90,11 @@ class MemcachedAdapter extends AbstractAdapter
*
* @param array[]|string|string[] $servers An array of servers, a DSN, or an array of DSNs
*
* @return \Memcached
*
* @throws \ErrorException When invalid options or servers are provided
*/
public static function createConnection(array|string $servers, array $options = []): \Memcached
public static function createConnection($servers, array $options = [])
{
if (\is_string($servers)) {
$servers = [$servers];
@@ -240,7 +242,7 @@ class MemcachedAdapter extends AbstractAdapter
/**
* {@inheritdoc}
*/
protected function doSave(array $values, int $lifetime): array|bool
protected function doSave(array $values, int $lifetime)
{
if (!$values = $this->marshaller->marshall($values, $failed)) {
return $failed;
@@ -261,7 +263,7 @@ class MemcachedAdapter extends AbstractAdapter
/**
* {@inheritdoc}
*/
protected function doFetch(array $ids): iterable
protected function doFetch(array $ids)
{
try {
$encodedIds = array_map([__CLASS__, 'encodeKey'], $ids);
@@ -282,7 +284,7 @@ class MemcachedAdapter extends AbstractAdapter
/**
* {@inheritdoc}
*/
protected function doHave(string $id): bool
protected function doHave(string $id)
{
return false !== $this->getClient()->get(self::encodeKey($id)) || $this->checkResultCode(\Memcached::RES_SUCCESS === $this->client->getResultCode());
}
@@ -290,7 +292,7 @@ class MemcachedAdapter extends AbstractAdapter
/**
* {@inheritdoc}
*/
protected function doDelete(array $ids): bool
protected function doDelete(array $ids)
{
$ok = true;
$encodedIds = array_map([__CLASS__, 'encodeKey'], $ids);
@@ -306,12 +308,12 @@ class MemcachedAdapter extends AbstractAdapter
/**
* {@inheritdoc}
*/
protected function doClear(string $namespace): bool
protected function doClear(string $namespace)
{
return '' === $namespace && $this->getClient()->flush();
}
private function checkResultCode(mixed $result)
private function checkResultCode($result)
{
$code = $this->client->getResultCode();
@@ -324,7 +326,7 @@ class MemcachedAdapter extends AbstractAdapter
private function getClient(): \Memcached
{
if (isset($this->client)) {
if ($this->client) {
return $this->client;
}