Skip to content

Commit

Permalink
Prepare 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreGauthier committed Jun 14, 2024
1 parent 1ced2eb commit 99d2dc6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"require": {
"php": "^8.0",
"sylius/sylius": "^1.12",
"gally/gally-php-rest-sdk": "1.3.0"
"gally/gally-php-rest-sdk": "1.3.1"
},
"require-dev": {
"behat/behat": "^3.6.1",
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
parameters:
level: 5
reportUnmatchedIgnoredErrors: false
checkMissingIterableValueType: false
treatPhpDocTypesAsCertain: false
paths:
- src
Expand Down
8 changes: 7 additions & 1 deletion src/Indexer/ProductIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Sylius\Component\Core\Model\ChannelInterface;
use Sylius\Component\Core\Model\ProductInterface;
use Sylius\Component\Core\Model\ProductVariantInterface;
use Sylius\Component\Core\Model\TaxonInterface;
use Sylius\Component\Core\Repository\ProductRepositoryInterface;
use Sylius\Component\Locale\Model\LocaleInterface;
use Sylius\Component\Product\Model\ProductOptionValueInterface;
Expand Down Expand Up @@ -58,9 +59,14 @@ public function getDocumentsToIndex(
if (!empty($documentIdsToReindex)) {
$products = $this->productRepository->findBy(['id' => $documentIdsToReindex]);
} else {
$taxon = $channel->getMenuTaxon();
if (null === $taxon) {
throw new \LogicException('No menu taxon define for channel ' . $channel->getCode());
}
/** @var TaxonInterface $taxon */
$queryBuilder = $this->productRepository->createShopListQueryBuilder(
$channel,
$channel->getMenuTaxon(),
$taxon,
$locale->getCode(),
[],
true
Expand Down

0 comments on commit 99d2dc6

Please sign in to comment.