Skip to content

Commit 99d2dc6

Browse files
Prepare 1.3.1
1 parent 1ced2eb commit 99d2dc6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"require": {
1212
"php": "^8.0",
1313
"sylius/sylius": "^1.12",
14-
"gally/gally-php-rest-sdk": "1.3.0"
14+
"gally/gally-php-rest-sdk": "1.3.1"
1515
},
1616
"require-dev": {
1717
"behat/behat": "^3.6.1",

phpstan.neon

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
parameters:
22
level: 5
33
reportUnmatchedIgnoredErrors: false
4-
checkMissingIterableValueType: false
54
treatPhpDocTypesAsCertain: false
65
paths:
76
- src

src/Indexer/ProductIndexer.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Sylius\Component\Core\Model\ChannelInterface;
2121
use Sylius\Component\Core\Model\ProductInterface;
2222
use Sylius\Component\Core\Model\ProductVariantInterface;
23+
use Sylius\Component\Core\Model\TaxonInterface;
2324
use Sylius\Component\Core\Repository\ProductRepositoryInterface;
2425
use Sylius\Component\Locale\Model\LocaleInterface;
2526
use Sylius\Component\Product\Model\ProductOptionValueInterface;
@@ -58,9 +59,14 @@ public function getDocumentsToIndex(
5859
if (!empty($documentIdsToReindex)) {
5960
$products = $this->productRepository->findBy(['id' => $documentIdsToReindex]);
6061
} else {
62+
$taxon = $channel->getMenuTaxon();
63+
if (null === $taxon) {
64+
throw new \LogicException('No menu taxon define for channel ' . $channel->getCode());
65+
}
66+
/** @var TaxonInterface $taxon */
6167
$queryBuilder = $this->productRepository->createShopListQueryBuilder(
6268
$channel,
63-
$channel->getMenuTaxon(),
69+
$taxon,
6470
$locale->getCode(),
6571
[],
6672
true

0 commit comments

Comments
 (0)