Skip to content

Commit

Permalink
Remove unnecessary singleton scopes and add new binding.
Browse files Browse the repository at this point in the history
Removed singleton scope from several bindings to allow better flexibility and lifecycle control. Added a new binding for `RefreshSameCommand` to expand functionality.
  • Loading branch information
koriym committed Jan 6, 2025
1 parent 1263315 commit aaeb79c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/QueryRepositoryModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ protected function configure(): void
// core
$this->bind(QueryRepositoryInterface::class)->to(QueryRepository::class)->in(Scope::SINGLETON);
$this->bind(CacheDependencyInterface::class)->to(CacheDependency::class);
$this->bind(EtagSetterInterface::class)->to(EtagSetter::class)->in(Scope::SINGLETON);
$this->bind(NamedParameterInterface::class)->to(NamedParameter::class)->in(Scope::SINGLETON);
$this->bind(EtagSetterInterface::class)->to(EtagSetter::class);
$this->bind(NamedParameterInterface::class)->to(NamedParameter::class);
$this->bind(ResourceStorageInterface::class)->to(ResourceStorage::class)->in(Scope::SINGLETON);
$this->bind(MatchQueryInterface::class)->to(MatchQuery::class)->in(Scope::SINGLETON);
$this->bind(UriTag::class)->in(Scope::SINGLETON);
$this->bind(MatchQueryInterface::class)->to(MatchQuery::class);
$this->bind(RefreshAnnotatedCommand::class);
$this->bind(RefreshSameCommand::class);
$this->bind(ResourceStorageSaver::class);
// #[Cacheable]
$this->install(new CacheableModule());
Expand Down

0 comments on commit aaeb79c

Please sign in to comment.