From 13f078d0055737d6eb9b1e49e2a1e03ee77163a9 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 11 Jun 2024 10:02:24 +0900 Subject: [PATCH] Remove singleton scope from certain classes The previous implementation made use of the singleton scope for the RowInterface, RowListInterface, and InvokeInterface. This change removes this scope, allowing new instances of these classes to be created each time they are needed. This may improve flexibility in certain use cases and can prevent potential issues related to state persistence across multiple uses. --- src/SqlQueryProviderModule.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SqlQueryProviderModule.php b/src/SqlQueryProviderModule.php index 7b132fe..0cacd9e 100644 --- a/src/SqlQueryProviderModule.php +++ b/src/SqlQueryProviderModule.php @@ -23,8 +23,8 @@ protected function configure() { $this->bind(SqlFinder::class)->in(Scope::SINGLETON); $this->bind(ParamReaderInterface::class)->to(ParamReader::class)->in(Scope::SINGLETON); - $this->bind(RowInterface::class)->toProvider(RowInterfaceProvider::class)->in(Scope::SINGLETON); - $this->bind(RowListInterface::class)->toProvider(RowListInterfaceProvider::class)->in(Scope::SINGLETON); - $this->bind(InvokeInterface::class)->toProvider(RowListInterfaceProvider::class)->in(Scope::SINGLETON); + $this->bind(RowInterface::class)->toProvider(RowInterfaceProvider::class); + $this->bind(RowListInterface::class)->toProvider(RowListInterfaceProvider::class); + $this->bind(InvokeInterface::class)->toProvider(RowListInterfaceProvider::class); } }