From 78ff8e233fcfaf596a85ddc3bbacda7aca537fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Fri, 16 May 2025 17:07:53 +0200 Subject: [PATCH] fix: Switch lazy object to enabled by default on PHP 8.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- config/config.sample.php | 4 ++-- lib/base.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index da87edff575..1578398c72e 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -2748,7 +2748,7 @@ $CONFIG = [ * Enable lazy objects feature from PHP 8.4 to be used in the Dependency Injection. * Should improve performances by avoiding buiding unused objects. * - * Defaults to false. + * Defaults to true. */ -'enable_lazy_objects' => false, +'enable_lazy_objects' => true, ]; diff --git a/lib/base.php b/lib/base.php index 9fa6707654a..55856889489 100644 --- a/lib/base.php +++ b/lib/base.php @@ -619,7 +619,7 @@ class OC { $loaderEnd = microtime(true); // Enable lazy loading if activated - \OC\AppFramework\Utility\SimpleContainer::$useLazyObjects = (bool)self::$config->getValue('enable_lazy_objects'); + \OC\AppFramework\Utility\SimpleContainer::$useLazyObjects = (bool)self::$config->getValue('enable_lazy_objects', true); // setup the basic server self::$server = new \OC\Server(\OC::$WEBROOT, self::$config);