Updates to vendors etc

This commit is contained in:
Chris Hunt
2025-07-11 15:57:48 +01:00
parent d972cbcd0a
commit 8fb6438254
8043 changed files with 248005 additions and 189479 deletions

View File

@@ -29,10 +29,7 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class CachePoolPass implements CompilerPassInterface
{
/**
* @return void
*/
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if ($container->hasParameter('cache.prefix.seed')) {
$seed = $container->getParameterBag()->resolveValue($container->getParameter('cache.prefix.seed'));
@@ -58,9 +55,11 @@ class CachePoolPass implements CompilerPassInterface
continue;
}
$class = $adapter->getClass();
$providers = $adapter->getArguments();
while ($adapter instanceof ChildDefinition) {
$adapter = $container->findDefinition($adapter->getParent());
$class = $class ?: $adapter->getClass();
$providers += $adapter->getArguments();
if ($t = $adapter->getTag('cache.pool')) {
$tags[0] += $t[0];
}
@@ -90,7 +89,7 @@ class CachePoolPass implements CompilerPassInterface
if (ChainAdapter::class === $class) {
$adapters = [];
foreach ($adapter->getArgument(0) as $provider => $adapter) {
foreach ($providers['index_0'] ?? $providers[0] as $provider => $adapter) {
if ($adapter instanceof ChildDefinition) {
$chainedPool = $adapter;
} else {
@@ -109,7 +108,7 @@ class CachePoolPass implements CompilerPassInterface
}
if (ChainAdapter::class === $chainedClass) {
throw new InvalidArgumentException(sprintf('Invalid service "%s": chain of adapters cannot reference another chain, found "%s".', $id, $chainedPool->getParent()));
throw new InvalidArgumentException(\sprintf('Invalid service "%s": chain of adapters cannot reference another chain, found "%s".', $id, $chainedPool->getParent()));
}
$i = 0;
@@ -167,7 +166,7 @@ class CachePoolPass implements CompilerPassInterface
unset($tags[0][$attr]);
}
if (!empty($tags[0])) {
throw new InvalidArgumentException(sprintf('Invalid "cache.pool" tag for service "%s": accepted attributes are "clearer", "provider", "name", "namespace", "default_lifetime", "early_expiration_message_bus" and "reset", found "%s".', $id, implode('", "', array_keys($tags[0]))));
throw new InvalidArgumentException(\sprintf('Invalid "cache.pool" tag for service "%s": accepted attributes are "clearer", "provider", "name", "namespace", "default_lifetime", "early_expiration_message_bus" and "reset", found "%s".', $id, implode('", "', array_keys($tags[0]))));
}
if (null !== $clearer) {
@@ -197,10 +196,6 @@ class CachePoolPass implements CompilerPassInterface
$clearer->setArgument(0, $pools);
}
$clearer->addTag('cache.pool.clearer');
if ('cache.system_clearer' === $id) {
$clearer->addTag('kernel.cache_clearer');
}
}
$allPoolsKeys = array_keys($allPools);
@@ -220,7 +215,7 @@ class CachePoolPass implements CompilerPassInterface
private function getNamespace(string $seed, string $id): string
{
return substr(str_replace('/', '-', base64_encode(hash('sha256', $id.$seed, true))), 0, 10);
return substr(str_replace('/', '-', base64_encode(hash('xxh128', $id.$seed, true))), 0, 10);
}
/**