From a9acaaa45f13868dc927072c5701173a2268c321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 16 Jun 2025 16:35:27 +0200 Subject: [PATCH] fix(encryption): Fix DI for encryption Manager class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only IManager was registered but the class name is used as well for DI in the encryption application. This was causing a crash of encryption command when using PHP 8.4 and lazy ghosts. Signed-off-by: Côme Chilliet --- lib/private/Server.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/Server.php b/lib/private/Server.php index b84c001a20008..5964a979e215e 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -322,7 +322,7 @@ public function __construct($webRoot, \OC\Config $config) { return new Profiler($c->get(SystemConfig::class)); }); - $this->registerService(\OCP\Encryption\IManager::class, function (Server $c): Encryption\Manager { + $this->registerService(Encryption\Manager::class, function (Server $c): Encryption\Manager { $view = new View(); $util = new Encryption\Util( $view, @@ -339,6 +339,7 @@ public function __construct($webRoot, \OC\Config $config) { new ArrayCache() ); }); + $this->registerAlias(\OCP\Encryption\IManager::class, Encryption\Manager::class); $this->registerService(IFile::class, function (ContainerInterface $c) { $util = new Encryption\Util(