-
Notifications
You must be signed in to change notification settings - Fork 112
Closed
Description
after last release doctrine/orm 3.5.8
phpstan-doctrine returns error:
Uncaught Doctrine\ORM\ORMInvalidArgumentException: Symfony LazyGhost is not available. Please install the "symfony/var-exporter" package version 6.4 or 7 to use this feature or enable PHP 8.4 native lazy objects. in vendor/doctrine/orm/src/ORMInvalidArgumentException.php:165
possible way how to fix this issue:
// class PHPStan\Doctrine\Mapping\ClassMetadataFactory
if (PHP_VERSION_ID >= 80400) {
$config->enableNativeLazyObjects(true);
} else {
$config->setAutoGenerateProxyClasses(true);
$config->setProxyDir($this->tmpDir);
$config->setProxyNamespace('__PHPStanDoctrine__\\Proxy');
}Metadata
Metadata
Assignees
Labels
No labels