Commit 99d2dc6 1 parent 1ced2eb commit 99d2dc6 Copy full SHA for 99d2dc6
File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11
11
"require" : {
12
12
"php" : " ^8.0" ,
13
13
"sylius/sylius" : " ^1.12" ,
14
- "gally/gally-php-rest-sdk" : " 1.3.0 "
14
+ "gally/gally-php-rest-sdk" : " 1.3.1 "
15
15
},
16
16
"require-dev" : {
17
17
"behat/behat" : " ^3.6.1" ,
Original file line number Diff line number Diff line change 1
1
parameters :
2
2
level : 5
3
3
reportUnmatchedIgnoredErrors : false
4
- checkMissingIterableValueType : false
5
4
treatPhpDocTypesAsCertain : false
6
5
paths :
7
6
- src
Original file line number Diff line number Diff line change 20
20
use Sylius \Component \Core \Model \ChannelInterface ;
21
21
use Sylius \Component \Core \Model \ProductInterface ;
22
22
use Sylius \Component \Core \Model \ProductVariantInterface ;
23
+ use Sylius \Component \Core \Model \TaxonInterface ;
23
24
use Sylius \Component \Core \Repository \ProductRepositoryInterface ;
24
25
use Sylius \Component \Locale \Model \LocaleInterface ;
25
26
use Sylius \Component \Product \Model \ProductOptionValueInterface ;
@@ -58,9 +59,14 @@ public function getDocumentsToIndex(
58
59
if (!empty ($ documentIdsToReindex )) {
59
60
$ products = $ this ->productRepository ->findBy (['id ' => $ documentIdsToReindex ]);
60
61
} 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 */
61
67
$ queryBuilder = $ this ->productRepository ->createShopListQueryBuilder (
62
68
$ channel ,
63
- $ channel -> getMenuTaxon () ,
69
+ $ taxon ,
64
70
$ locale ->getCode (),
65
71
[],
66
72
true
You can’t perform that action at this time.
0 commit comments