fix: Fix several side effects of lazy ghosts

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2025-04-29 17:32:15 +02:00
parent 86ff5810d7
commit 98b2cfc416
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A
2 changed files with 9 additions and 0 deletions

View file

@ -100,6 +100,9 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
if ($parameter->allowsNull() && ($parameterType instanceof ReflectionNamedType)) {
return null;
}
// don't lose the error we got while trying to query by type
throw new QueryException($e->getMessage(), (int)$e->getCode(), $e);
}
}

View file

@ -69,6 +69,12 @@ class App {
$step['args'][1] === $classNameParts[1]) {
$setUpViaQuery = true;
break;
} elseif (isset($step['class'], $step['function'], $step['args'][0]) &&
$step['class'] === \ReflectionClass::class &&
$step['function'] === 'initializeLazyObject' &&
$step['args'][0] === $this) {
$setUpViaQuery = true;
break;
}
}