summaryrefslogtreecommitdiff
path: root/vendor/symfony/cache
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2020-03-01 14:04:48 +0000
committerGreg Roach <greg@subaqua.co.uk>2020-03-02 16:16:18 +0000
commite82ac1bc63f7beb683f7bc54d250c751e6f95cf0 (patch)
tree9f42e3f52b3ee4c5c1d7bead0746987025e6f59e /vendor/symfony/cache
parent011fcf73dc6699b0ffc850fa7af9c71855820ee7 (diff)
downloadwebtrees-e82ac1bc63f7beb683f7bc54d250c751e6f95cf0.tar.gz
webtrees-e82ac1bc63f7beb683f7bc54d250c751e6f95cf0.tar.bz2
webtrees-e82ac1bc63f7beb683f7bc54d250c751e6f95cf0.zip
Update vendor dependencies
Diffstat (limited to 'vendor/symfony/cache')
-rw-r--r--vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php2
-rw-r--r--vendor/symfony/cache/Simple/TraceableCache.php1
-rw-r--r--vendor/symfony/cache/Traits/AbstractTrait.php12
-rw-r--r--vendor/symfony/cache/Traits/ContractsTrait.php2
-rw-r--r--vendor/symfony/cache/Traits/PdoTrait.php2
5 files changed, 14 insertions, 5 deletions
diff --git a/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php b/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php
index 1dbce4b0db..f936afd589 100644
--- a/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php
+++ b/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php
@@ -80,7 +80,7 @@ class RedisTagAwareAdapter extends AbstractTagAwareAdapter
foreach (\is_array($compression) ? $compression : [$compression] as $c) {
if (\Redis::COMPRESSION_NONE !== $c) {
- throw new InvalidArgumentException(sprintf('phpredis compression must be disabled when using "%s", use "%s" instead.', \get_class($this), DeflateMarshaller::class));
+ throw new InvalidArgumentException(sprintf('phpredis compression must be disabled when using "%s", use "%s" instead.', static::class, DeflateMarshaller::class));
}
}
}
diff --git a/vendor/symfony/cache/Simple/TraceableCache.php b/vendor/symfony/cache/Simple/TraceableCache.php
index eac77badd4..2214f1c818 100644
--- a/vendor/symfony/cache/Simple/TraceableCache.php
+++ b/vendor/symfony/cache/Simple/TraceableCache.php
@@ -12,6 +12,7 @@
namespace Symfony\Component\Cache\Simple;
use Psr\SimpleCache\CacheInterface as Psr16CacheInterface;
+use Symfony\Component\Cache\Adapter\TraceableAdapter;
use Symfony\Component\Cache\PruneableInterface;
use Symfony\Component\Cache\ResettableInterface;
use Symfony\Contracts\Cache\CacheInterface;
diff --git a/vendor/symfony/cache/Traits/AbstractTrait.php b/vendor/symfony/cache/Traits/AbstractTrait.php
index f9a1d8fdaf..7639424ea7 100644
--- a/vendor/symfony/cache/Traits/AbstractTrait.php
+++ b/vendor/symfony/cache/Traits/AbstractTrait.php
@@ -111,9 +111,14 @@ trait AbstractTrait
*/
public function clear(/*string $prefix = ''*/)
{
- $prefix = 0 < \func_num_args() ? (string) func_get_arg(0) : '';
$this->deferred = [];
if ($cleared = $this->versioningIsEnabled) {
+ if ('' === $namespaceVersionToClear = $this->namespaceVersion) {
+ foreach ($this->doFetch([static::NS_SEPARATOR.$this->namespace]) as $v) {
+ $namespaceVersionToClear = $v;
+ }
+ }
+ $namespaceToClear = $this->namespace.$namespaceVersionToClear;
$namespaceVersion = substr_replace(base64_encode(pack('V', mt_rand())), static::NS_SEPARATOR, 5);
try {
$cleared = $this->doSave([static::NS_SEPARATOR.$this->namespace => $namespaceVersion], 0);
@@ -124,10 +129,13 @@ trait AbstractTrait
$this->namespaceVersion = $namespaceVersion;
$this->ids = [];
}
+ } else {
+ $prefix = 0 < \func_num_args() ? (string) func_get_arg(0) : '';
+ $namespaceToClear = $this->namespace.$prefix;
}
try {
- return $this->doClear($this->namespace.$prefix) || $cleared;
+ return $this->doClear($namespaceToClear) || $cleared;
} catch (\Exception $e) {
CacheItem::log($this->logger, 'Failed to clear the cache: '.$e->getMessage(), ['exception' => $e]);
diff --git a/vendor/symfony/cache/Traits/ContractsTrait.php b/vendor/symfony/cache/Traits/ContractsTrait.php
index c5827c3b73..06070c970c 100644
--- a/vendor/symfony/cache/Traits/ContractsTrait.php
+++ b/vendor/symfony/cache/Traits/ContractsTrait.php
@@ -52,7 +52,7 @@ trait ContractsTrait
private function doGet(AdapterInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null)
{
if (0 > $beta = $beta ?? 1.0) {
- throw new InvalidArgumentException(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', \get_class($this), $beta));
+ throw new InvalidArgumentException(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta));
}
static $setMetadata;
diff --git a/vendor/symfony/cache/Traits/PdoTrait.php b/vendor/symfony/cache/Traits/PdoTrait.php
index 73f8c6465e..f927b4ec47 100644
--- a/vendor/symfony/cache/Traits/PdoTrait.php
+++ b/vendor/symfony/cache/Traits/PdoTrait.php
@@ -403,7 +403,7 @@ trait PdoTrait
} else {
switch ($this->driver = $this->conn->getDriver()->getName()) {
case 'mysqli':
- throw new \LogicException(sprintf('The adapter "%s" does not support the mysqli driver, use pdo_mysql instead.', \get_class($this)));
+ throw new \LogicException(sprintf('The adapter "%s" does not support the mysqli driver, use pdo_mysql instead.', static::class));
case 'pdo_mysql':
case 'drizzle_pdo_mysql':
$this->driver = 'mysql';