Skip to content

Commit 9422fdb

Browse files
[DependencyInjection][VarExporter] Generate lazy proxies for non-ghostable lazy services out of the box
1 parent 909c9a1 commit 9422fdb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ManagerRegistry.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use ProxyManager\Proxy\GhostObjectInterface;
1616
use ProxyManager\Proxy\LazyLoadingInterface;
1717
use Symfony\Component\DependencyInjection\Container;
18-
use Symfony\Component\VarExporter\LazyGhostObjectInterface;
18+
use Symfony\Component\VarExporter\LazyObjectInterface;
1919

2020
/**
2121
* References Doctrine connections and entity/document managers.
@@ -41,8 +41,8 @@ protected function resetService($name): void
4141
}
4242
$manager = $this->container->get($name);
4343

44-
if ($manager instanceof LazyGhostObjectInterface) {
45-
if (!$manager->resetLazyGhostObject()) {
44+
if ($manager instanceof LazyObjectInterface) {
45+
if (!$manager->resetLazyObject()) {
4646
throw new \LogicException(sprintf('Resetting a non-lazy manager service is not supported. Declare the "%s" service as lazy.', $name));
4747
}
4848

0 commit comments

Comments
 (0)