aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/vendor/symfony/cache
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/phpmyadmin/vendor/symfony/cache')
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractAdapter.php203
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php323
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/AdapterInterface.php46
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/ApcuAdapter.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/ArrayAdapter.php171
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/ChainAdapter.php332
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/DoctrineAdapter.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/FilesystemAdapter.php29
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php239
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/MemcachedAdapter.php37
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/NullAdapter.php156
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/PdoAdapter.php54
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/PhpArrayAdapter.php332
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/PhpFilesAdapter.php38
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/ProxyAdapter.php269
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/Psr16Adapter.php86
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/RedisAdapter.php30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php292
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/SimpleCacheAdapter.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/TagAwareAdapter.php429
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php33
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/TraceableAdapter.php302
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php38
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/CHANGELOG.md73
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/CacheItem.php202
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DataCollector/CacheDataCollector.php194
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php72
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php48
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolPass.php222
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php60
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DoctrineProvider.php114
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Exception/CacheException.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Exception/InvalidArgumentException.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Exception/LogicException.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/LockRegistry.php154
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Marshaller/DefaultMarshaller.php99
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Marshaller/DeflateMarshaller.php53
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Marshaller/MarshallerInterface.php40
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php89
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/PruneableInterface.php23
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Psr16Cache.php277
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/README.md18
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/ResettableInterface.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/AbstractCache.php199
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/ApcuCache.php31
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/ArrayCache.php167
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/ChainCache.php271
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/DoctrineCache.php34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/FilesystemCache.php36
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/MemcachedCache.php34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/NullCache.php104
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/PdoCache.php59
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/PhpArrayCache.php256
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/PhpFilesCache.php45
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/Psr6Cache.php23
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/RedisCache.php35
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/TraceableCache.php257
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/AbstractAdapterTrait.php155
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/AbstractTrait.php295
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/ApcuTrait.php121
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/ArrayTrait.php183
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/ContractsTrait.php97
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/DoctrineTrait.php98
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/FilesystemCommonTrait.php183
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/FilesystemTrait.php124
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/MemcachedTrait.php325
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/PdoTrait.php445
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/PhpArrayTrait.php169
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/PhpFilesTrait.php313
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/ProxyTrait.php43
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisClusterProxy.php63
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisProxy.php65
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisTrait.php511
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/composer.json59
75 files changed, 0 insertions, 10167 deletions
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractAdapter.php
deleted file mode 100644
index 98b42a4..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractAdapter.php
+++ /dev/null
@@ -1,203 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Log\LoggerAwareInterface;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\AbstractAdapterTrait;
-use Symfony\Component\Cache\Traits\ContractsTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-abstract class AbstractAdapter implements AdapterInterface, CacheInterface, LoggerAwareInterface, ResettableInterface
-{
- /**
- * @internal
- */
- protected const NS_SEPARATOR = ':';
-
- use AbstractAdapterTrait;
- use ContractsTrait;
-
- private static $apcuSupported;
- private static $phpFilesSupported;
-
- protected function __construct(string $namespace = '', int $defaultLifetime = 0)
- {
- $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).static::NS_SEPARATOR;
- if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) {
- throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s")', $this->maxIdLength - 24, \strlen($namespace), $namespace));
- }
- $this->createCacheItem = \Closure::bind(
- static function ($key, $value, $isHit) use ($defaultLifetime) {
- $item = new CacheItem();
- $item->key = $key;
- $item->value = $v = $value;
- $item->isHit = $isHit;
- $item->defaultLifetime = $defaultLifetime;
- // Detect wrapped values that encode for their expiry and creation duration
- // For compactness, these values are packed in the key of an array using
- // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F
- if (\is_array($v) && 1 === \count($v) && 10 === \strlen($k = key($v)) && "\x9D" === $k[0] && "\0" === $k[5] && "\x5F" === $k[9]) {
- $item->value = $v[$k];
- $v = unpack('Ve/Nc', substr($k, 1, -1));
- $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET;
- $item->metadata[CacheItem::METADATA_CTIME] = $v['c'];
- }
-
- return $item;
- },
- null,
- CacheItem::class
- );
- $getId = \Closure::fromCallable([$this, 'getId']);
- $this->mergeByLifetime = \Closure::bind(
- static function ($deferred, $namespace, &$expiredIds) use ($getId) {
- $byLifetime = [];
- $now = microtime(true);
- $expiredIds = [];
-
- foreach ($deferred as $key => $item) {
- $key = (string) $key;
- if (null === $item->expiry) {
- $ttl = 0 < $item->defaultLifetime ? $item->defaultLifetime : 0;
- } elseif (0 >= $ttl = (int) (0.1 + $item->expiry - $now)) {
- $expiredIds[] = $getId($key);
- continue;
- }
- if (isset(($metadata = $item->newMetadata)[CacheItem::METADATA_TAGS])) {
- unset($metadata[CacheItem::METADATA_TAGS]);
- }
- // For compactness, expiry and creation duration are packed in the key of an array, using magic numbers as separators
- $byLifetime[$ttl][$getId($key)] = $metadata ? ["\x9D".pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME])."\x5F" => $item->value] : $item->value;
- }
-
- return $byLifetime;
- },
- null,
- CacheItem::class
- );
- }
-
- /**
- * Returns the best possible adapter that your runtime supports.
- *
- * Using ApcuAdapter makes system caches compatible with read-only filesystems.
- *
- * @param string $namespace
- * @param int $defaultLifetime
- * @param string $version
- * @param string $directory
- *
- * @return AdapterInterface
- */
- public static function createSystemCache($namespace, $defaultLifetime, $version, $directory, LoggerInterface $logger = null)
- {
- $opcache = new PhpFilesAdapter($namespace, $defaultLifetime, $directory, true);
- if (null !== $logger) {
- $opcache->setLogger($logger);
- }
-
- if (!self::$apcuSupported = self::$apcuSupported ?? ApcuAdapter::isSupported()) {
- return $opcache;
- }
-
- $apcu = new ApcuAdapter($namespace, (int) $defaultLifetime / 5, $version);
- if ('cli' === \PHP_SAPI && !filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) {
- $apcu->setLogger(new NullLogger());
- } elseif (null !== $logger) {
- $apcu->setLogger($logger);
- }
-
- return new ChainAdapter([$apcu, $opcache]);
- }
-
- public static function createConnection($dsn, array $options = [])
- {
- if (!\is_string($dsn)) {
- throw new InvalidArgumentException(sprintf('The %s() method expect argument #1 to be string, %s given.', __METHOD__, \gettype($dsn)));
- }
- if (0 === strpos($dsn, 'redis:') || 0 === strpos($dsn, 'rediss:')) {
- return RedisAdapter::createConnection($dsn, $options);
- }
- if (0 === strpos($dsn, 'memcached:')) {
- return MemcachedAdapter::createConnection($dsn, $options);
- }
-
- throw new InvalidArgumentException(sprintf('Unsupported DSN: %s.', $dsn));
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function commit()
- {
- $ok = true;
- $byLifetime = $this->mergeByLifetime;
- $byLifetime = $byLifetime($this->deferred, $this->namespace, $expiredIds);
- $retry = $this->deferred = [];
-
- if ($expiredIds) {
- $this->doDelete($expiredIds);
- }
- foreach ($byLifetime as $lifetime => $values) {
- try {
- $e = $this->doSave($values, $lifetime);
- } catch (\Exception $e) {
- }
- if (true === $e || [] === $e) {
- continue;
- }
- if (\is_array($e) || 1 === \count($values)) {
- foreach (\is_array($e) ? $e : array_keys($values) as $id) {
- $ok = false;
- $v = $values[$id];
- $type = \is_object($v) ? \get_class($v) : \gettype($v);
- $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.');
- CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null]);
- }
- } else {
- foreach ($values as $id => $v) {
- $retry[$lifetime][] = $id;
- }
- }
- }
-
- // When bulk-save failed, retry each item individually
- foreach ($retry as $lifetime => $ids) {
- foreach ($ids as $id) {
- try {
- $v = $byLifetime[$lifetime][$id];
- $e = $this->doSave([$id => $v], $lifetime);
- } catch (\Exception $e) {
- }
- if (true === $e || [] === $e) {
- continue;
- }
- $ok = false;
- $type = \is_object($v) ? \get_class($v) : \gettype($v);
- $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.');
- CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null]);
- }
- }
-
- return $ok;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php
deleted file mode 100644
index 10aca3b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php
+++ /dev/null
@@ -1,323 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Log\LoggerAwareInterface;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\AbstractAdapterTrait;
-use Symfony\Component\Cache\Traits\ContractsTrait;
-use Symfony\Contracts\Cache\TagAwareCacheInterface;
-
-/**
- * Abstract for native TagAware adapters.
- *
- * To keep info on tags, the tags are both serialized as part of cache value and provided as tag ids
- * to Adapters on operations when needed for storage to doSave(), doDelete() & doInvalidate().
- *
- * @author Nicolas Grekas <p@tchwork.com>
- * @author André Rømcke <andre.romcke+symfony@gmail.com>
- *
- * @internal
- */
-abstract class AbstractTagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, LoggerAwareInterface, ResettableInterface
-{
- use AbstractAdapterTrait;
- use ContractsTrait;
-
- private const TAGS_PREFIX = "\0tags\0";
-
- protected function __construct(string $namespace = '', int $defaultLifetime = 0)
- {
- $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).':';
- if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) {
- throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s")', $this->maxIdLength - 24, \strlen($namespace), $namespace));
- }
- $this->createCacheItem = \Closure::bind(
- static function ($key, $value, $isHit) use ($defaultLifetime) {
- $item = new CacheItem();
- $item->key = $key;
- $item->defaultLifetime = $defaultLifetime;
- $item->isTaggable = true;
- // If structure does not match what we expect return item as is (no value and not a hit)
- if (!\is_array($value) || !\array_key_exists('value', $value)) {
- return $item;
- }
- $item->isHit = $isHit;
- // Extract value, tags and meta data from the cache value
- $item->value = $value['value'];
- $item->metadata[CacheItem::METADATA_TAGS] = $value['tags'] ?? [];
- if (isset($value['meta'])) {
- // For compactness these values are packed, & expiry is offset to reduce size
- $v = unpack('Ve/Nc', $value['meta']);
- $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET;
- $item->metadata[CacheItem::METADATA_CTIME] = $v['c'];
- }
-
- return $item;
- },
- null,
- CacheItem::class
- );
- $getId = \Closure::fromCallable([$this, 'getId']);
- $tagPrefix = self::TAGS_PREFIX;
- $this->mergeByLifetime = \Closure::bind(
- static function ($deferred, &$expiredIds) use ($getId, $tagPrefix) {
- $byLifetime = []