Skip to content

Commit

Permalink
IBX-8394: Used new RepositoryConfigurationProviderInterface contract (#…
Browse files Browse the repository at this point in the history
…49)

For more details see https://issues.ibexa.co/browse/IBX-8394 and #49

Key changes:

* [Rector] Used new RepositoryConfigurationProviderInterface contract
  • Loading branch information
alongosz authored Jul 25, 2024
1 parent 1730825 commit 1cfaf7d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Ibexa\Search\SortingDefinition\Provider;

use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider;
use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface;
use Ibexa\Contracts\Core\Repository\Values\Content\Query;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause\ContentName;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause\ContentTranslatedName;
Expand All @@ -21,11 +21,11 @@

final class NameSortingDefinitionProvider implements SortingDefinitionProviderInterface, TranslationContainerInterface
{
private RepositoryConfigurationProvider $configurationProvider;
private RepositoryConfigurationProviderInterface $configurationProvider;

private TranslatorInterface $translator;

public function __construct(RepositoryConfigurationProvider $configurationProvider, TranslatorInterface $translator)
public function __construct(RepositoryConfigurationProviderInterface $configurationProvider, TranslatorInterface $translator)
{
$this->configurationProvider = $configurationProvider;
$this->translator = $translator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Ibexa\Tests\Search\EventDispatcher\EventListener;

use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider;
use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface;
use Ibexa\Contracts\Core\Exception\InvalidArgumentException;
use Ibexa\Contracts\Core\Repository\SearchService as SearchServiceInterface;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
Expand All @@ -33,8 +33,8 @@

final class ContentSuggestionSubscriberTest extends TestCase
{
/** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider&\PHPUnit\Framework\MockObject\MockObject */
private RepositoryConfigurationProvider $configProviderMock;
/** @var \Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface&\PHPUnit\Framework\MockObject\MockObject */
private RepositoryConfigurationProviderInterface $configProviderMock;

private ?Query $capturedQuery;

Expand All @@ -45,7 +45,7 @@ final class ContentSuggestionSubscriberTest extends TestCase

protected function setUp(): void
{
$this->configProviderMock = $this->createMock(RepositoryConfigurationProvider::class);
$this->configProviderMock = $this->createMock(RepositoryConfigurationProviderInterface::class);
$this->capturedQuery = null;
$this->searchServiceSupportsScoring = false;
$this->loggerMock = $this->createMock(LoggerInterface::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Ibexa\Tests\Search\SortingDefinition\Provider;

use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider;
use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface;
use Ibexa\Contracts\Core\Repository\Values\Content\Query;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause\ContentName;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause\ContentTranslatedName;
Expand All @@ -22,8 +22,8 @@ final class NameSortingDefinitionProviderTest extends TestCase
/** @var \Symfony\Contracts\Translation\TranslatorInterface&\PHPUnit\Framework\MockObject\MockObject */
private TranslatorInterface $translator;

/** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider&\PHPUnit\Framework\MockObject\MockObject */
private RepositoryConfigurationProvider $configurationProvider;
/** @var \Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface&\PHPUnit\Framework\MockObject\MockObject */
private RepositoryConfigurationProviderInterface $configurationProvider;

private NameSortingDefinitionProvider $provider;

Expand All @@ -32,7 +32,7 @@ protected function setUp(): void
$this->translator = $this->createMock(TranslatorInterface::class);
$this->translator->method('trans')->willReturnArgument(0);

$this->configurationProvider = $this->createMock(RepositoryConfigurationProvider::class);
$this->configurationProvider = $this->createMock(RepositoryConfigurationProviderInterface::class);

$this->provider = new NameSortingDefinitionProvider(
$this->configurationProvider,
Expand Down

0 comments on commit 1cfaf7d

Please sign in to comment.