diff --git a/src/Suhock/DependencyInjection/ContainerTransientBuilderTrait.php b/src/Suhock/DependencyInjection/ContainerTransientBuilderTrait.php index 0cea263..91c174a 100644 --- a/src/Suhock/DependencyInjection/ContainerTransientBuilderTrait.php +++ b/src/Suhock/DependencyInjection/ContainerTransientBuilderTrait.php @@ -37,7 +37,7 @@ abstract protected function getInjector(): InjectorInterface; */ public function addTransient(string $className, string|Closure|null $source = null): static { - $this->addSingletonInstanceProvider( + $this->addTransientInstanceProvider( $className, InstanceProviderFactory::createInstanceProvider($this->getInjector(), $this, $className, $source) );