From 83349e9282fa14e75a45021e217bb43c7f9777b8 Mon Sep 17 00:00:00 2001 From: pkly Date: Sun, 1 Jan 2023 12:15:58 +0100 Subject: [PATCH] Check if provider was default before fetching from target service --- src/Service/Entity/EntityProviderService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/Entity/EntityProviderService.php b/src/Service/Entity/EntityProviderService.php index cba0601..6717098 100644 --- a/src/Service/Entity/EntityProviderService.php +++ b/src/Service/Entity/EntityProviderService.php @@ -52,7 +52,7 @@ public function getProvider( ?string $providerId = null ): ProviderInterface { if (!array_key_exists($fqcn, $this->providers)) { - if ($this->targetService?->setFqcn($fqcn)) { + if (null === $providerId && $this->targetService?->setFqcn($fqcn)) { return $this->targetService; }