Skip to content

Commit

Permalink
Update dependencies and refactor CommandsProvider constructor
Browse files Browse the repository at this point in the history
Upgraded multiple dependencies in `composer.lock` to include the latest versions. Updated `CommandsProvider` to replace `QueryRepositoryInterface` and `ResourceInterface` with specific command dependencies for better clarity and modular design.
  • Loading branch information
koriym committed Jan 6, 2025
1 parent e5ed3c9 commit 01aa1ce
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 111 deletions.
9 changes: 4 additions & 5 deletions src/CommandsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@

namespace BEAR\QueryRepository;

use BEAR\Resource\ResourceInterface;
use Ray\Di\ProviderInterface;

/** @implements ProviderInterface<array<CommandInterface>> */
final class CommandsProvider implements ProviderInterface
{
public function __construct(
private readonly QueryRepositoryInterface $repository,
private readonly ResourceInterface $resource,
private readonly RefreshSameCommand $refreshSameCommand,
private readonly RefreshAnnotatedCommand $refreshAnnotatedCommand,
) {
}

Expand All @@ -22,8 +21,8 @@ public function __construct(
public function get()
{
return [
new RefreshSameCommand($this->repository, new MatchQuery()),
new RefreshAnnotatedCommand($this->repository, $this->resource),
$this->refreshSameCommand,
$this->refreshAnnotatedCommand,
];
}
}
Loading

0 comments on commit 01aa1ce

Please sign in to comment.