1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the Spryker Commerce OS. |
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
declare(strict_types = 1); |
9
|
|
|
|
10
|
|
|
namespace Pyz\Zed\CartReorder; |
11
|
|
|
|
12
|
|
|
use Spryker\Zed\AvailabilityCartConnector\Communication\Plugin\CartReorder\RemoveUnavailableItemsCartReorderPreAddToCartPlugin; |
13
|
|
|
use Spryker\Zed\CartNote\Communication\Plugin\CartReorder\CartNoteCartPreReorderPlugin; |
14
|
|
|
use Spryker\Zed\CartNote\Communication\Plugin\CartReorder\CartNoteCartReorderItemHydratorPlugin; |
15
|
|
|
use Spryker\Zed\CartReorder\CartReorderDependencyProvider as SprykerCartReorderDependencyProvider; |
16
|
|
|
use Spryker\Zed\Comment\Communication\Plugin\CartReorder\CopyOrderCommentThreadCartPreReorderPlugin; |
17
|
|
|
use Spryker\Zed\ConfigurableBundleNote\Communication\Plugin\CartReorder\ConfigurableBundleNoteCartReorderItemHydratorPlugin; |
18
|
|
|
use Spryker\Zed\Currency\Communication\Plugin\CartReorder\CopyOrderCurrencyCartPreReorderPlugin; |
19
|
|
|
use Spryker\Zed\MultiCart\Communication\Plugin\CartReorder\DefaultReorderQuoteNameCartPreReorderPlugin; |
20
|
|
|
use Spryker\Zed\MultiCart\Communication\Plugin\CartReorder\NewPersistentCartReorderQuoteProviderStrategyPlugin; |
21
|
|
|
use Spryker\Zed\OrderCustomReference\Communication\Plugin\CartReorder\OrderCustomReferenceCartPreReorderPlugin; |
22
|
|
|
use Spryker\Zed\PersistentCart\Communication\Plugin\CartReorder\ReplacePersistentCartReorderQuoteProviderStrategyPlugin; |
23
|
|
|
use Spryker\Zed\PersistentCart\Communication\Plugin\CartReorder\UpdateQuoteCartPostReorderPlugin; |
24
|
|
|
use Spryker\Zed\Price\Communication\Plugin\CartReorder\CopyOrderPriceModeCartPreReorderPlugin; |
25
|
|
|
use Spryker\Zed\PriceProductSalesOrderAmendment\Communication\Plugin\CartReorder\OriginalSalesOrderItemPriceCartPreReorderPlugin; |
26
|
|
|
use Spryker\Zed\ProductBundle\Communication\Plugin\CartReorder\OriginalOrderBundleItemCartPreReorderPlugin; |
27
|
|
|
use Spryker\Zed\ProductBundle\Communication\Plugin\CartReorder\ProductBundleCartReorderOrderItemFilterPlugin; |
28
|
|
|
use Spryker\Zed\ProductBundle\Communication\Plugin\CartReorder\ReplaceBundledItemsCartPreReorderPlugin; |
29
|
|
|
use Spryker\Zed\ProductCartConnector\Communication\Plugin\CartReorder\RemoveInactiveItemsCartReorderPreAddToCartPlugin; |
30
|
|
|
use Spryker\Zed\ProductList\Communication\Plugin\CartReorder\ProductListRestrictedItemsCartPreReorderPlugin; |
31
|
|
|
use Spryker\Zed\ProductMeasurementUnit\Communication\Plugin\CartReorder\MergeProductMeasurementUnitItemsCartPreReorderPlugin; |
32
|
|
|
use Spryker\Zed\ProductMeasurementUnit\Communication\Plugin\CartReorder\ProductMeasurementUnitCartReorderItemHydratorPlugin; |
33
|
|
|
use Spryker\Zed\ProductOption\Communication\Plugin\CartReorder\ProductOptionCartReorderItemHydratorPlugin; |
34
|
|
|
use Spryker\Zed\ProductOptionCartConnector\Communication\Plugin\CartReorder\RemoveInactiveProductOptionItemsCartReorderPreAddToCartPlugin; |
35
|
|
|
use Spryker\Zed\ProductPackagingUnit\Communication\Plugin\CartReorder\MergeProductPackagingUnitItemsCartPreReorderPlugin; |
36
|
|
|
use Spryker\Zed\ProductPackagingUnit\Communication\Plugin\CartReorder\ProductPackagingUnitCartReorderItemHydratorPlugin; |
37
|
|
|
use Spryker\Zed\ProductQuantity\Communication\Plugin\CartReorder\MergeProductQuantityRestrictionItemsCartPreReorderPlugin; |
38
|
|
|
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\CartReorder\ConfigurableBundleCartReorderItemHydratorPlugin; |
39
|
|
|
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\CartReorder\ConfiguredBundleCartPostReorderPlugin; |
40
|
|
|
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\CartReorder\MergeConfigurableBundleItemsCartPreReorderPlugin; |
41
|
|
|
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\AmendmentOrderReferenceCartPreReorderPlugin; |
42
|
|
|
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\AmendmentQuoteNameCartPreReorderPlugin; |
43
|
|
|
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OrderAmendmentCartReorderValidatorPlugin; |
44
|
|
|
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OrderAmendmentQuoteProcessFlowExpanderCartPreReorderPlugin; |
45
|
|
|
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OriginalSalesOrderItemCartPreReorderPlugin; |
46
|
|
|
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OriginalSalesOrderItemGroupKeyCartReorderItemHydratorPlugin; |
47
|
|
|
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\QuoteRequestVersionCartReorderValidatorPlugin; |
48
|
|
|
use Spryker\Zed\SalesOrderAmendmentOms\Communication\Plugin\CartReorder\IsAmendableOrderCartReorderRequestValidatorPlugin; |
49
|
|
|
use Spryker\Zed\SalesOrderAmendmentOms\Communication\Plugin\CartReorder\StartOrderAmendmentCartReorderPostCreatePlugin; |
50
|
|
|
use Spryker\Zed\SalesProductConfiguration\Communication\Plugin\CartReorder\ProductConfigurationCartReorderItemHydratorPlugin; |
51
|
|
|
use Spryker\Zed\Store\Communication\Plugin\CartReorder\CurrentStoreCartReorderValidatorPlugin; |
52
|
|
|
|
53
|
|
|
class CartReorderDependencyProvider extends SprykerCartReorderDependencyProvider |
54
|
|
|
{ |
55
|
|
|
/** |
56
|
|
|
* @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderValidatorPluginInterface> |
|
|
|
|
57
|
|
|
*/ |
58
|
|
|
protected function getCartReorderValidatorPlugins(): array |
59
|
|
|
{ |
60
|
|
|
return [ |
|
|
|
|
61
|
|
|
new CurrentStoreCartReorderValidatorPlugin(), |
62
|
|
|
]; |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderRequestValidatorPluginInterface> |
67
|
|
|
*/ |
68
|
|
|
protected function getCartReorderRequestValidatorPlugins(): array |
69
|
|
|
{ |
70
|
|
|
return [ |
|
|
|
|
71
|
|
|
new IsAmendableOrderCartReorderRequestValidatorPlugin(), |
72
|
|
|
]; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderQuoteProviderStrategyPluginInterface> |
77
|
|
|
*/ |
78
|
|
|
protected function getCartReorderQuoteProviderStrategyPlugins(): array |
79
|
|
|
{ |
80
|
|
|
return [ |
|
|
|
|
81
|
|
|
new ReplacePersistentCartReorderQuoteProviderStrategyPlugin(), |
82
|
|
|
new NewPersistentCartReorderQuoteProviderStrategyPlugin(), |
83
|
|
|
]; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderValidatorPluginInterface> |
88
|
|
|
*/ |
89
|
|
|
protected function getCartReorderValidatorPluginsForOrderAmendment(): array |
90
|
|
|
{ |
91
|
|
|
return [ |
|
|
|
|
92
|
|
|
new CurrentStoreCartReorderValidatorPlugin(), |
93
|
|
|
new OrderAmendmentCartReorderValidatorPlugin(), |
94
|
|
|
new QuoteRequestVersionCartReorderValidatorPlugin(), |
95
|
|
|
]; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartPreReorderPluginInterface> |
100
|
|
|
*/ |
101
|
|
|
protected function getCartPreReorderPlugins(): array |
102
|
|
|
{ |
103
|
|
|
return [ |
104
|
|
|
new CopyOrderCurrencyCartPreReorderPlugin(), |
105
|
|
|
new CopyOrderPriceModeCartPreReorderPlugin(), |
106
|
|
|
new ProductListRestrictedItemsCartPreReorderPlugin(), |
107
|
|
|
new DefaultReorderQuoteNameCartPreReorderPlugin(), |
108
|
|
|
new ReplaceBundledItemsCartPreReorderPlugin(), |
109
|
|
|
new MergeProductMeasurementUnitItemsCartPreReorderPlugin(), |
110
|
|
|
new MergeProductPackagingUnitItemsCartPreReorderPlugin(), |
111
|
|
|
new MergeConfigurableBundleItemsCartPreReorderPlugin(), |
112
|
|
|
new CartNoteCartPreReorderPlugin(), |
113
|
|
|
new OrderCustomReferenceCartPreReorderPlugin(), |
114
|
|
|
new MergeProductQuantityRestrictionItemsCartPreReorderPlugin(), |
115
|
|
|
new CopyOrderCommentThreadCartPreReorderPlugin(), |
116
|
|
|
new OrderAmendmentQuoteProcessFlowExpanderCartPreReorderPlugin(), #Order Amendment Feature |
117
|
|
|
new AmendmentOrderReferenceCartPreReorderPlugin(), #Order Amendment Feature |
118
|
|
|
new AmendmentQuoteNameCartPreReorderPlugin(), #Order Amendment Feature |
119
|
|
|
new OriginalSalesOrderItemPriceCartPreReorderPlugin(), #Order Amendment Feature |
120
|
|
|
new OriginalSalesOrderItemCartPreReorderPlugin(), #Order Amendment Feature |
121
|
|
|
new OriginalOrderBundleItemCartPreReorderPlugin(), #Order Amendment Feature |
122
|
|
|
]; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderItemHydratorPluginInterface> |
127
|
|
|
*/ |
128
|
|
|
protected function getCartReorderItemHydratorPlugins(): array |
129
|
|
|
{ |
130
|
|
|
return [ |
131
|
|
|
new ProductMeasurementUnitCartReorderItemHydratorPlugin(), |
132
|
|
|
new ProductPackagingUnitCartReorderItemHydratorPlugin(), |
133
|
|
|
new CartNoteCartReorderItemHydratorPlugin(), |
134
|
|
|
new ProductConfigurationCartReorderItemHydratorPlugin(), |
135
|
|
|
new ProductOptionCartReorderItemHydratorPlugin(), |
136
|
|
|
new ConfigurableBundleCartReorderItemHydratorPlugin(), |
137
|
|
|
new ConfigurableBundleNoteCartReorderItemHydratorPlugin(), |
138
|
|
|
new OriginalSalesOrderItemGroupKeyCartReorderItemHydratorPlugin(), |
139
|
|
|
]; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartPostReorderPluginInterface> |
144
|
|
|
*/ |
145
|
|
|
protected function getCartPostReorderPlugins(): array |
146
|
|
|
{ |
147
|
|
|
return [ |
|
|
|
|
148
|
|
|
new UpdateQuoteCartPostReorderPlugin(), |
149
|
|
|
new ConfiguredBundleCartPostReorderPlugin(), |
150
|
|
|
new StartOrderAmendmentCartReorderPostCreatePlugin(), |
151
|
|
|
]; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderPreAddToCartPluginInterface> |
156
|
|
|
*/ |
157
|
|
|
protected function getCartReorderPreAddToCartPlugins(): array |
158
|
|
|
{ |
159
|
|
|
return [ |
|
|
|
|
160
|
|
|
new RemoveUnavailableItemsCartReorderPreAddToCartPlugin(), |
161
|
|
|
new RemoveInactiveItemsCartReorderPreAddToCartPlugin(), |
162
|
|
|
new RemoveInactiveProductOptionItemsCartReorderPreAddToCartPlugin(), |
163
|
|
|
]; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderPreAddToCartPluginInterface> |
168
|
|
|
*/ |
169
|
|
|
protected function getCartReorderPreAddToCartPluginsForOrderAmendment(): array |
170
|
|
|
{ |
171
|
|
|
return [ |
|
|
|
|
172
|
|
|
new RemoveInactiveProductOptionItemsCartReorderPreAddToCartPlugin(), |
173
|
|
|
]; |
174
|
|
|
} |
175
|
|
|
|
176
|
|
|
/** |
177
|
|
|
* @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderOrderItemFilterPluginInterface> |
178
|
|
|
*/ |
179
|
|
|
protected function getCartReorderOrderItemFilterPlugins(): array |
180
|
|
|
{ |
181
|
|
|
return [ |
|
|
|
|
182
|
|
|
new ProductBundleCartReorderOrderItemFilterPlugin(), |
183
|
|
|
]; |
184
|
|
|
} |
185
|
|
|
} |
186
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths