8000 [DoctrineBridge] [DX] Update exception text in ManagerRegistry::reset… · symfony/symfony@ad4e2b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit ad4e2b4

Browse files
author
Amrouche Hamza
committed
< 8000 span class="ws-pre-wrap f5 wb-break-word text-mono prc-Text-Text-0ima0">
[DoctrineBridge] [DX] Update exception text in ManagerRegistry::resetService to avoid confusion.
1 parent 3568418 commit ad4e2b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Doctrine/ManagerRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function resetService($name)
4646
$manager = $this->container->get($name);
4747

4848
if (!$manager instanceof LazyLoadingInterface) {
49-
throw new \LogicException(sprintf('Resetting a non-lazy manager service is not supported. Set the "%s" service as lazy and require "symfony/proxy-manager-bridge" in your composer.json file instead.', $name));
49+
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".'));
5050
}
5151
$manager->setProxyInitializer(\Closure::bind(
5252
function (&$wrappedInstance, LazyLoadingInterface $manager) use ($name) {

0 commit comments

Comments
 (0)
0