Skip to content

Commit b8d4311

Browse files
Merge branch '4.3' into 4.4
* 4.3: [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion Fix testing with mongodb Minor Travis cosmetic patch [Cache] fix checking for igbinary availability bumped Symfony version to 4.3.11 updated VERSION for 4.3.10 updated CHANGELOG for 4.3.10 bumped Symfony version to 3.4.38 updated VERSION for 3.4.37 update CONTRIBUTORS for 3.4.37 updated CHANGELOG for 3.4.37
2 parents 0755dfc + 64cbcf5 commit b8d4311

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ManagerRegistry.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Doctrine\Persistence\AbstractManagerRegistry;
1515
use ProxyManager\Proxy\LazyLoadingInterface;
16+
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
1617
use Symfony\Component\DependencyInjection\Container;
1718

1819
/**
@@ -50,7 +51,7 @@ protected function resetService($name)
5051
$manager = $this->container->get($name);
5152

5253
if (!$manager instanceof LazyLoadingInterface) {
53-
throw new \LogicException('Resetting a non-lazy manager service is not supported. '.(interface_exists(LazyLoadingInterface::class) ? sprintf('Declare the "%s" service as lazy.', $name) : 'Try running "composer require symfony/proxy-manager-bridge".'));
54+
throw new \LogicException('Resetting a non-lazy manager service is not supported. '.(interface_exists(LazyLoadingInterface::class) && class_exists(RuntimeInstantiator::class) ? sprintf('Declare the "%s" service as lazy.', $name) : 'Try running "composer require symfony/proxy-manager-bridge".'));
5455
}
5556
$manager->setProxyInitializer(\Closure::bind(
5657
function (&$wrappedInstance, LazyLoadingInterface $manager) use ($name) {

0 commit comments

Comments
 (0)