diff options
-rw-r--r-- | lib/base.php | 7 | ||||
-rw-r--r-- | lib/private/AppFramework/Utility/SimpleContainer.php | 3 | ||||
-rw-r--r-- | lib/public/AppFramework/App.php | 6 |
3 files changed, 15 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index aa463e206a3..919b7e47fb2 100644 --- a/lib/base.php +++ b/lib/base.php @@ -784,7 +784,12 @@ class OC { if ($systemConfig->getValue('installed', false)) { $appManager->loadApp('settings'); /* Build core application to make sure that listeners are registered */ - Server::get(\OC\Core\Application::class); + $coreApplication = Server::get(\OC\Core\Application::class); + if (PHP_VERSION_ID >= 80400) { + /* FIXME On 8.4 constructor is not called unless we do that or use the object */ + $reflector = new \ReflectionClass(\OC\Core\Application::class); + $reflector->initializeLazyObject($coreApplication); + } } //make sure temporary files are cleaned up diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php index 0e46dd71e0d..4558c7417cf 100644 --- a/lib/private/AppFramework/Utility/SimpleContainer.php +++ b/lib/private/AppFramework/Utility/SimpleContainer.php @@ -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); } } diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index 06404baea70..052bfda865b 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -70,6 +70,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; } } |