From 87bd6bcd1dd3015f84ff9c1e57f79ed0cefb43ae Mon Sep 17 00:00:00 2001 From: Marc Henry Schultz <85400359+mhsdesign@users.noreply.github.com> Date: Thu, 12 Mar 2026 16:53:39 +0100 Subject: [PATCH] BUGFIX: Add debug info to exception if backend creation fails Otherwise > Neos\Cache\Backend\RedisBackend::setHostname(): Argument #1 ($hostname) must be of type string, false given is the only part of the exception message --- Classes/Cache/CacheFactory.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Classes/Cache/CacheFactory.php b/Classes/Cache/CacheFactory.php index 3058bf6..a86d373 100644 --- a/Classes/Cache/CacheFactory.php +++ b/Classes/Cache/CacheFactory.php @@ -75,11 +75,16 @@ public function set(string $entryIdentifier, string $data, array $tags = [], int CacheAccessCollector::registerCache($cacheIdentifier, $backendObjectName); - return $this->instantiateBackend( - $proxyBackendFQDN, - $backendOptions, - $environmentConfiguration, - $persistent - ); + + try { + return $this->instantiateBackend( + $proxyBackendFQDN, + $backendOptions, + $environmentConfiguration, + $persistent + ); + } catch (\Throwable $throwable) { + throw new \RuntimeException(sprintf('Cannot instantiate debug proxied backend "%s" for cache "%s"', $backendObjectName, $cacheIdentifier), 1773330049, $throwable); + } } }