Browse Source
fix: Do not try to create lazy ghosts for PHP internal classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/55375/head
Côme Chilliet
4 weeks ago
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
1 changed files with
1 additions and
1 deletions
-
lib/private/AppFramework/Utility/SimpleContainer.php
|
|
|
@ -61,7 +61,7 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer { |
|
|
|
/* No constructor, return a instance directly */ |
|
|
|
return $class->newInstance(); |
|
|
|
} |
|
|
|
if (PHP_VERSION_ID >= 80400 && self::$useLazyObjects) { |
|
|
|
if (PHP_VERSION_ID >= 80400 && self::$useLazyObjects && !$class->isInternal()) { |
|
|
|
/* For PHP>=8.4, use a lazy ghost to delay constructor and dependency resolving */ |
|
|
|
/** @psalm-suppress UndefinedMethod */ |
|
|
|
return $class->newLazyGhost(function (object $object) use ($constructor): void { |
|
|
|
|