Browse Source
Merge pull request #55375 from nextcloud/fix/do-not-use-lazy-with-internal
fix: Do not try to create lazy ghosts for PHP internal classes
pull/55333/head
Ferdinand Thiessen
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 { |
|
|
|