. */ declare(strict_types=1); /** * This class extends the default doctrine ORM configuration to enable native lazy objects on PHP 8.4+. * We have to do this in a PHP file, because the yaml file does not support conditionals on PHP version. */ return static function(\Symfony\Config\DoctrineConfig $doctrine) { //On PHP 8.4+ we can use native lazy objects, which are much more efficient than proxies. if (PHP_VERSION_ID >= 80400) { $doctrine->orm()->enableNativeLazyObjects(true); } };