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

@@ -26,10 +26,7 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class CacheCollectorPass implements CompilerPassInterface
{
/**
* @return void
*/
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('data_collector.cache')) {
return;
@@ -55,7 +52,7 @@ class CacheCollectorPass implements CompilerPassInterface
if (!$definition->isPublic() || !$definition->isPrivate()) {
$recorder->setPublic($definition->isPublic());
}
$recorder->setArguments([new Reference($innerId = $id.'.recorder_inner')]);
$recorder->setArguments([new Reference($innerId = $id.'.recorder_inner'), new Reference('profiler.is_disabled_state_checker', ContainerBuilder::IGNORE_ON_INVALID_REFERENCE)]);
foreach ($definition->getMethodCalls() as [$method, $args]) {
if ('setCallbackWrapper' !== $method || !$args[0] instanceof Definition || !($args[0]->getArguments()[2] ?? null) instanceof Definition) {

View File

@@ -20,10 +20,7 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class CachePoolClearerPass implements CompilerPassInterface
{
/**
* @return void
*/
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
$container->getParameterBag()->remove('cache.prefix.seed');

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);
}
/**

View File

@@ -23,10 +23,7 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class CachePoolPrunerPass implements CompilerPassInterface
{
/**
* @return void
*/
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('console.command.cache_pool_prune')) {
return;
@@ -38,7 +35,7 @@ class CachePoolPrunerPass implements CompilerPassInterface
$class = $container->getParameterBag()->resolveValue($container->getDefinition($id)->getClass());
if (!$reflection = $container->getReflectionClass($class)) {
throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
}
if ($reflection->implementsInterface(PruneableInterface::class)) {