Skip to content

Commit 7fdc4e5

Browse files
beberleigreg0ire
andauthored
Apply suggestions from code review
Co-authored-by: Grégoire Paris <postmaster@greg0ire.fr>
1 parent f957ef3 commit 7fdc4e5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/en/reference/advanced-configuration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Native Lazy Objects (***OPTIONAL***)
8080
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8181

8282
With PHP 8.4 we recommend that you use native lazy objects instead of
83-
the code generation approach using the symfony/var-exporter Ghost trait.
83+
the code generation approach using the ``symfony/var-exporter`` Ghost trait.
8484

8585
With Doctrine 4, the minimal requirement will become PHP 8.4 and native lazy objects
8686
will become the only approach to lazy loading.

src/Mapping/ClassMetadataFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ protected function validateRuntimeMetadata(ClassMetadata $class, ClassMetadataIn
304304
$property = $propertyAccessor->getUnderlyingReflector();
305305

306306
if (PHP_VERSION_ID >= 80400 && count($property->getHooks()) > 0) {
307-
throw new LogicException('Doctrine ORM does not support property hooks without also enabling Configuration::setLazyProxyEnabled(true). Check https://github.com/doctrine/orm/issues/11624 for details of versions that support property hooks.');
307+
throw new LogicException('Doctrine ORM does not support property hooks without also enabling Configuration::enableNativeLazyObjects(true). Check https://github.com/doctrine/orm/issues/11624 for details of versions that support property hooks.');
308308
}
309309
}
310310
}

src/Proxy/ProxyFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function getProxy(string $className, array $identifier): object
170170
$classMetadata = $this->em->getClassMetadata($className);
171171
$entityPersister = $this->uow->getEntityPersister($className);
172172

173-
$proxy = $classMetadata->reflClass->newLazyGhost(static function ($object) use ($identifier, $entityPersister): void {
173+
$proxy = $classMetadata->reflClass->newLazyGhost(static function (object $object) use ($identifier, $entityPersister): void {
174174
$entityPersister->loadById($identifier, $object);
175175
}, ReflectionClass::SKIP_INITIALIZATION_ON_SERIALIZE);
176176

0 commit comments

Comments
 (0)