mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-09 08:23:53 +09:00
Updates to vendors etc
This commit is contained in:
@@ -44,7 +44,7 @@ interface CacheInterface
|
||||
*
|
||||
* @throws InvalidArgumentException When $key is not valid or when $beta is negative
|
||||
*/
|
||||
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed;
|
||||
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed;
|
||||
|
||||
/**
|
||||
* Removes an item from the pool.
|
||||
|
||||
@@ -25,7 +25,7 @@ class_exists(InvalidArgumentException::class);
|
||||
*/
|
||||
trait CacheTrait
|
||||
{
|
||||
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed
|
||||
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed
|
||||
{
|
||||
return $this->doGet($this, $key, $callback, $beta, $metadata);
|
||||
}
|
||||
@@ -35,10 +35,10 @@ trait CacheTrait
|
||||
return $this->deleteItem($key);
|
||||
}
|
||||
|
||||
private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null, LoggerInterface $logger = null): mixed
|
||||
private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, ?array &$metadata = null, ?LoggerInterface $logger = null): mixed
|
||||
{
|
||||
if (0 > $beta ??= 1.0) {
|
||||
throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException {};
|
||||
throw new class(\sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException {};
|
||||
}
|
||||
|
||||
$item = $pool->getItem($key);
|
||||
@@ -54,7 +54,7 @@ trait CacheTrait
|
||||
$item->expiresAt(null);
|
||||
$logger?->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [
|
||||
'key' => $key,
|
||||
'delta' => sprintf('%.1f', $expiry - $now),
|
||||
'delta' => \sprintf('%.1f', $expiry - $now),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
31
vendor/symfony/cache-contracts/NamespacedPoolInterface.php
vendored
Normal file
31
vendor/symfony/cache-contracts/NamespacedPoolInterface.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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\Contracts\Cache;
|
||||
|
||||
use Psr\Cache\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Enables namespace-based invalidation by prefixing keys with backend-native namespace separators.
|
||||
*
|
||||
* Note that calling `withSubNamespace()` MUST NOT mutate the pool, but return a new instance instead.
|
||||
*
|
||||
* When tags are used, they MUST ignore sub-namespaces.
|
||||
*
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
interface NamespacedPoolInterface
|
||||
{
|
||||
/**
|
||||
* @throws InvalidArgumentException If the namespace contains characters found in ItemInterface's RESERVED_CHARACTERS
|
||||
*/
|
||||
public function withSubNamespace(string $namespace): static;
|
||||
}
|
||||
2
vendor/symfony/cache-contracts/composer.json
vendored
2
vendor/symfony/cache-contracts/composer.json
vendored
@@ -25,7 +25,7 @@
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.4-dev"
|
||||
"dev-main": "3.6-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
|
||||
Reference in New Issue
Block a user