Skip to content

Commit 50f44ff

Browse files
authored
FFWEB-2710: Backward compatibility for Shopware v. 6.4
EntityRepositoryInterface and SalesChannelRepositoryInterface will be deleted in Shopware v. 6.5 We will prepare special release for compatible with Shopware v. 6.5 soon.
1 parent 3dab717 commit 50f44ff

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Changelog
2+
## Unreleased
3+
### Fix
4+
- Fix problem with autowire EntityRepository and SalesChannelRepository for Shopware 6.4
25
## [v4.2.4] - 2023.04.26
36
### Fix
47
- Fix problem with ff-template in search result page

src/Command/RunPreprocessorCommand.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Shopware\Core\Defaults;
1313
use Shopware\Core\Framework\Api\Context\SystemSource;
1414
use Shopware\Core\Framework\Context;
15-
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository;
15+
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
1616
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
1717
use Shopware\Core\System\Language\LanguageEntity;
1818
use Shopware\Core\System\SalesChannel\SalesChannelEntity;
@@ -35,16 +35,16 @@ class RunPreprocessorCommand extends Command
3535
private FeedPreprocessorEntryPersister $entryPersister;
3636
private ExportProducts $exportProducts;
3737
private SalesChannelService $channelService;
38-
private EntityRepository $languageRepository;
39-
private EntityRepository $channelRepository;
38+
private EntityRepositoryInterface $languageRepository;
39+
private EntityRepositoryInterface $channelRepository;
4040

4141
public function __construct(
4242
FeedPreprocessor $feedPreprocessor,
4343
FeedPreprocessorEntryPersister $entryPersister,
4444
SalesChannelService $salesChannelService,
4545
ExportProducts $exportProducts,
46-
EntityRepository $languageRepository,
47-
EntityRepository $channelRepository
46+
EntityRepositoryInterface $languageRepository,
47+
EntityRepositoryInterface $channelRepository
4848
) {
4949
parent::__construct();
5050
$this->feedPreprocessor = $feedPreprocessor;

src/DataAbstractionLayer/FeedPreprocessorEntryReader.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66

77
use Omikron\FactFinder\Shopware6\Export\FeedPreprocessorEntry;
88
use Omikron\FactFinder\Shopware6\Export\SalesChannelService;
9-
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository;
9+
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
1010
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
1111
use Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\EqualsFilter;
1212
use Shopware\Core\Framework\Uuid\Uuid;
1313

1414
class FeedPreprocessorEntryReader
1515
{
1616
private SalesChannelService $channelService;
17-
private EntityRepository $entryRepository;
17+
private EntityRepositoryInterface $entryRepository;
1818

1919
public function __construct(
2020
SalesChannelService $channelService,
21-
EntityRepository $entryRepository
21+
EntityRepositoryInterface $entryRepository
2222
) {
2323
$this->channelService = $channelService;
2424
$this->entryRepository = $entryRepository;

src/Export/ExportProducts.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
use Omikron\FactFinder\Shopware6\Export\Data\Entity\ProductEntity as ExportProductEntity;
88
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
99
use Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\EqualsFilter;
10-
use Shopware\Core\System\SalesChannel\Entity\SalesChannelRepository;
10+
use Shopware\Core\System\SalesChannel\Entity\SalesChannelRepositoryInterface;
1111
use Shopware\Core\System\SalesChannel\SalesChannelContext;
1212

1313
class ExportProducts implements ExportInterface
1414
{
15-
private SalesChannelRepository $productRepository;
15+
private SalesChannelRepositoryInterface $productRepository;
1616

1717
/** @var string[] */
1818
private array $customAssociations;
1919

20-
public function __construct(SalesChannelRepository $productRepository, array $customAssociations)
20+
public function __construct(SalesChannelRepositoryInterface $productRepository, array $customAssociations)
2121
{
2222
$this->productRepository = $productRepository;
2323
$this->customAssociations = $customAssociations;

0 commit comments

Comments
 (0)