fix(encryption): Fix DI for encryption Manager class

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 <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2025-06-16 16:35:27 +02:00
parent 0450ce9ed4
commit a9acaaa45f
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -322,7 +322,7 @@ class Server extends ServerContainer implements IServerContainer {
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 @@ class Server extends ServerContainer implements IServerContainer {
new ArrayCache()
);
});
$this->registerAlias(\OCP\Encryption\IManager::class, Encryption\Manager::class);
$this->registerService(IFile::class, function (ContainerInterface $c) {
$util = new Encryption\Util(