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\Sales; |
11
|
|
|
|
12
|
|
|
use Spryker\Zed\Currency\Communication\Plugin\Sales\CurrencyOrderExpanderPlugin; |
13
|
|
|
use Spryker\Zed\Customer\Communication\Plugin\Sales\CustomerOrderHydratePlugin; |
14
|
|
|
use Spryker\Zed\Discount\Communication\Plugin\Sales\DiscountOrderHydratePlugin; |
15
|
|
|
use Spryker\Zed\Discount\Communication\Plugin\Sales\DiscountSalesOrderItemCollectionPreDeletePlugin; |
16
|
|
|
use Spryker\Zed\Discount\Communication\Plugin\Sales\SalesDiscountSalesExpensePreDeletePlugin; |
17
|
|
|
use Spryker\Zed\GiftCard\Communication\Plugin\Sales\GiftCardOrderItemsPostSavePlugin; |
18
|
|
|
use Spryker\Zed\GiftCard\Communication\Plugin\Sales\GiftCardSalesOrderItemCollectionPreDeletePlugin; |
19
|
|
|
use Spryker\Zed\Nopayment\Communication\Plugin\Sales\NopaymentSalesOrderItemCollectionPreDeletePlugin; |
20
|
|
|
use Spryker\Zed\Oms\Communication\Plugin\Sales\DefaultOrderItemInitialStateProviderPlugin; |
21
|
|
|
use Spryker\Zed\Oms\Communication\Plugin\Sales\IsCancellableOrderExpanderPlugin; |
22
|
|
|
use Spryker\Zed\Oms\Communication\Plugin\Sales\IsCancellableSearchOrderExpanderPlugin; |
23
|
|
|
use Spryker\Zed\Oms\Communication\Plugin\Sales\ItemStateOrderItemExpanderPlugin; |
24
|
|
|
use Spryker\Zed\Oms\Communication\Plugin\Sales\OmsItemHistorySalesOrderItemCollectionPreDeletePlugin; |
25
|
|
|
use Spryker\Zed\Oms\Communication\Plugin\Sales\OmsStatesOrderExpanderPlugin; |
26
|
|
|
use Spryker\Zed\Oms\Communication\Plugin\Sales\OrderAggregatedItemStateSearchOrderExpanderPlugin; |
27
|
|
|
use Spryker\Zed\Oms\Communication\Plugin\Sales\StateHistoryOrderItemExpanderPlugin; |
28
|
|
|
use Spryker\Zed\OmsMultiThread\Communication\Plugin\Sales\OmsMultiThreadProcessorIdentifierOrderExpanderPreSavePlugin; |
29
|
|
|
use Spryker\Zed\OrderCustomReference\Communication\Plugin\Sales\OrderCustomReferenceOrderPostSavePlugin; |
30
|
|
|
use Spryker\Zed\OrderCustomReference\Communication\Plugin\Sales\UpdateOrderCustomReferenceOrderPostSavePlugin; |
31
|
|
|
use Spryker\Zed\ProductBundle\Communication\Plugin\Sales\ProductBundleIdHydratorPlugin; |
32
|
|
|
use Spryker\Zed\ProductBundle\Communication\Plugin\Sales\ProductBundleOptionItemExpanderPlugin; |
33
|
|
|
use Spryker\Zed\ProductBundle\Communication\Plugin\Sales\ProductBundleOptionOrderExpanderPlugin; |
34
|
|
|
use Spryker\Zed\ProductBundle\Communication\Plugin\Sales\ProductBundleOrderHydratePlugin; |
35
|
|
|
use Spryker\Zed\ProductBundle\Communication\Plugin\Sales\ProductBundleOrderItemExpanderPlugin; |
36
|
|
|
use Spryker\Zed\ProductBundle\Communication\Plugin\Sales\UniqueOrderBundleItemsExpanderPlugin; |
37
|
|
|
use Spryker\Zed\ProductOption\Communication\Plugin\Sales\ProductOptionGroupIdHydratorPlugin; |
38
|
|
|
use Spryker\Zed\ProductOption\Communication\Plugin\Sales\ProductOptionOrderItemsPostSavePlugin; |
39
|
|
|
use Spryker\Zed\ProductOption\Communication\Plugin\Sales\ProductOptionSalesOrderItemCollectionPostUpdatePlugin; |
40
|
|
|
use Spryker\Zed\ProductOption\Communication\Plugin\Sales\ProductOptionSalesOrderItemCollectionPreDeletePlugin; |
41
|
|
|
use Spryker\Zed\ProductOption\Communication\Plugin\Sales\ProductOptionsOrderItemExpanderPlugin; |
42
|
|
|
use Spryker\Zed\Sales\Communication\Plugin\Sales\CurrencyIsoCodeOrderItemExpanderPlugin; |
43
|
|
|
use Spryker\Zed\Sales\SalesDependencyProvider as SprykerSalesDependencyProvider; |
44
|
|
|
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\Sales\ConfiguredBundleItemPreTransformerPlugin; |
45
|
|
|
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\Sales\ConfiguredBundleOrderItemExpanderPlugin; |
46
|
|
|
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\Sales\ConfiguredBundlesOrderItemsPostSavePlugin; |
47
|
|
|
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\Sales\SalesConfigurableBundleSalesOrderItemCollectionPreDeletePlugin; |
48
|
|
|
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\Sales\SalesConfiguredBundlesSalesOrderItemCollectionPostUpdatePlugin; |
49
|
|
|
use Spryker\Zed\SalesOms\Communication\Plugin\OrderItemReferenceExpanderPreSavePlugin; |
50
|
|
|
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\Sales\CreateSalesOrderAmendmentOrderPostSavePlugin; |
51
|
|
|
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\Sales\SalesOrderAmendmentOrderExpanderPlugin; |
52
|
|
|
use Spryker\Zed\SalesOrderAmendmentOms\Communication\Plugin\Sales\IsAmendableOrderExpanderPlugin; |
53
|
|
|
use Spryker\Zed\SalesOrderAmendmentOms\Communication\Plugin\Sales\IsAmendableOrderSearchOrderExpanderPlugin; |
54
|
|
|
use Spryker\Zed\SalesOrderAmendmentOms\Communication\Plugin\Sales\OrderAmendmentDefaultOrderItemInitialStateProviderPlugin; |
55
|
|
|
use Spryker\Zed\SalesPayment\Communication\Plugin\Sales\SalesPaymentOrderExpanderPlugin; |
56
|
|
|
use Spryker\Zed\SalesProductConfiguration\Communication\Plugin\Sales\ProductConfigurationOrderItemExpanderPlugin; |
57
|
|
|
use Spryker\Zed\SalesProductConfiguration\Communication\Plugin\Sales\ProductConfigurationOrderItemsPostSavePlugin; |
58
|
|
|
use Spryker\Zed\SalesProductConfiguration\Communication\Plugin\Sales\SalesProductConfigurationSalesOrderItemCollectionPostUpdatePlugin; |
59
|
|
|
use Spryker\Zed\SalesProductConfiguration\Communication\Plugin\Sales\SalesProductConfigurationSalesOrderItemCollectionPreDeletePlugin; |
60
|
|
|
use Spryker\Zed\SalesProductConnector\Communication\Plugin\Sales\ItemMetadataOrderItemsPostSavePlugin; |
61
|
|
|
use Spryker\Zed\SalesProductConnector\Communication\Plugin\Sales\ItemMetadataSalesOrderItemCollectionPostUpdatePlugin; |
62
|
|
|
use Spryker\Zed\SalesProductConnector\Communication\Plugin\Sales\ItemMetadataSalesOrderItemCollectionPreDeletePlugin; |
63
|
|
|
use Spryker\Zed\SalesProductConnector\Communication\Plugin\Sales\ItemMetadataSearchOrderExpanderPlugin; |
64
|
|
|
use Spryker\Zed\SalesProductConnector\Communication\Plugin\Sales\MetadataOrderItemExpanderPlugin; |
65
|
|
|
use Spryker\Zed\SalesProductConnector\Communication\Plugin\Sales\ProductIdOrderItemExpanderPlugin; |
66
|
|
|
use Spryker\Zed\SalesQuantity\Communication\Plugin\SalesExtension\IsQuantitySplittableOrderItemExpanderPreSavePlugin; |
67
|
|
|
use Spryker\Zed\SalesQuantity\Communication\Plugin\SalesExtension\NonSplittableItemTransformerStrategyPlugin; |
68
|
|
|
use Spryker\Zed\SalesReclamation\Communication\Plugin\Sales\SalesReclamationSalesOrderItemCollectionPreDeletePlugin; |
69
|
|
|
use Spryker\Zed\SalesReclamationGui\Communication\Plugin\Sales\ReclamationSalesTablePlugin; |
70
|
|
|
use Spryker\Zed\SalesReturn\Communication\Plugin\Sales\RemunerationTotalOrderExpanderPlugin; |
71
|
|
|
use Spryker\Zed\SalesReturn\Communication\Plugin\Sales\UpdateOrderItemIsReturnableByGlobalReturnableNumberOfDaysPlugin; |
72
|
|
|
use Spryker\Zed\SalesReturn\Communication\Plugin\Sales\UpdateOrderItemIsReturnableByItemStatePlugin; |
73
|
|
|
use Spryker\Zed\Shipment\Communication\Plugin\ShipmentOrderHydratePlugin; |
74
|
|
|
use Spryker\Zed\WarehouseAllocation\Communication\Plugin\Sales\WarehouseOrderItemExpanderPlugin; |
75
|
|
|
|
76
|
|
|
class SalesDependencyProvider extends SprykerSalesDependencyProvider |
77
|
|
|
{ |
78
|
|
|
/** |
79
|
|
|
* @return array<\Spryker\Zed\Sales\Dependency\Plugin\OrderExpanderPreSavePluginInterface> |
80
|
|
|
*/ |
81
|
|
|
protected function getOrderExpanderPreSavePlugins(): array |
82
|
|
|
{ |
83
|
|
|
return [ |
84
|
|
|
new OmsMultiThreadProcessorIdentifierOrderExpanderPreSavePlugin(), |
85
|
|
|
]; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @return array<\Spryker\Zed\SalesExtension\Dependency\Plugin\OrderExpanderPluginInterface> |
90
|
|
|
*/ |
91
|
|
|
protected function getOrderHydrationPlugins(): array |
92
|
|
|
{ |
93
|
|
|
return [ |
94
|
|
|
new ProductBundleOrderHydratePlugin(), |
95
|
|
|
new DiscountOrderHydratePlugin(), |
96
|
|
|
new ShipmentOrderHydratePlugin(), |
97
|
|
|
new SalesPaymentOrderExpanderPlugin(), |
98
|
|
|
new CustomerOrderHydratePlugin(), |
99
|
|
|
new ProductBundleIdHydratorPlugin(), |
100
|
|
|
new ProductOptionGroupIdHydratorPlugin(), |
101
|
|
|
new ProductBundleOptionOrderExpanderPlugin(), |
102
|
|
|
new RemunerationTotalOrderExpanderPlugin(), |
103
|
|
|
new OmsStatesOrderExpanderPlugin(), |
104
|
|
|
new IsCancellableOrderExpanderPlugin(), |
105
|
|
|
new CurrencyOrderExpanderPlugin(), |
106
|
|
|
new SalesOrderAmendmentOrderExpanderPlugin(), |
107
|
|
|
new IsAmendableOrderExpanderPlugin(), |
108
|
|
|
]; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @return list<\Spryker\Zed\SalesExtension\Dependency\Plugin\OrderPostSavePluginInterface> |
|
|
|
|
113
|
|
|
*/ |
114
|
|
|
protected function getOrderPostSavePluginsForOrderAmendment(): array |
115
|
|
|
{ |
116
|
|
|
return [ |
|
|
|
|
117
|
|
|
new UpdateOrderCustomReferenceOrderPostSavePlugin(), |
118
|
|
|
new CreateSalesOrderAmendmentOrderPostSavePlugin(), |
119
|
|
|
]; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @return array<\Spryker\Zed\SalesExtension\Dependency\Plugin\OrderItemExpanderPreSavePluginInterface> |
124
|
|
|
*/ |
125
|
|
|
protected function getOrderItemExpanderPreSavePlugins(): array |
126
|
|
|
{ |
127
|
|
|
return [ |
128
|
|
|
new IsQuantitySplittableOrderItemExpanderPreSavePlugin(), |
129
|
|
|
new OrderItemReferenceExpanderPreSavePlugin(), |
130
|
|
|
]; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* @return array<\Spryker\Zed\SalesExtension\Dependency\Plugin\ItemTransformerStrategyPluginInterface> |
135
|
|
|
*/ |
136
|
|
|
public function getItemTransformerStrategyPlugins(): array |
137
|
|
|
{ |
138
|
|
|
return [ |
139
|
|
|
new NonSplittableItemTransformerStrategyPlugin(), |
140
|
|
|
]; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* @return array<\Spryker\Zed\SalesExtension\Dependency\Plugin\SalesTablePluginInterface> |
145
|
|
|
*/ |
146
|
|
|
protected function getSalesTablePlugins(): array |
147
|
|
|
{ |
148
|
|
|
return [ |
149
|
|
|
new ReclamationSalesTablePlugin(), |
150
|
|
|
]; |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* @return array<\Spryker\Zed\SalesExtension\Dependency\Plugin\OrderPostSavePluginInterface> |
155
|
|
|
*/ |
156
|
|
|
protected function getOrderPostSavePlugins(): array |
157
|
|
|
{ |
158
|
|
|
return [ |
159
|
|
|
new OrderCustomReferenceOrderPostSavePlugin(), |
160
|
|
|
]; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @return array<\Spryker\Zed\SalesExtension\Dependency\Plugin\ItemPreTransformerPluginInterface> |
165
|
|
|
*/ |
166
|
|
|
protected function getItemPreTransformerPlugins(): array |
167
|
|
|
{ |
168
|
|
|
return [ |
169
|
|
|
new ConfiguredBundleItemPreTransformerPlugin(), |
170
|
|
|
]; |
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
/** |
174
|
|
|
* @return array<\Spryker\Zed\SalesExtension\Dependency\Plugin\UniqueOrderItemsExpanderPluginInterface> |
175
|
|
|
*/ |
176
|
|
|
protected function getUniqueOrderItemsExpanderPlugins(): array |
177
|
|
|
{ |
178
|
|
|
return [ |
179
|
|
|
new UniqueOrderBundleItemsExpanderPlugin(), |
180
|
|
|
]; |
181
|
|
|
} |
182
|
|
|
|
183
|
|
|
/** |
184
|
|
|
* @return array<\Spryker\Zed\SalesExtension\Dependency\Plugin\OrderItemExpanderPluginInterface> |
185
|
|
|
*/ |
186
|
|
|
protected function getOrderItemExpanderPlugins(): array |
187
|
|
|
{ |
188
|
|
|
return [ |
189
|
|
|
new StateHistoryOrderItemExpanderPlugin(), |
190
|
|
|
new ProductIdOrderItemExpanderPlugin(), |
191
|
|
|
new ProductOptionsOrderItemExpanderPlugin(), |
192
|
|
|
new MetadataOrderItemExpanderPlugin(), |
193
|
|
|
new UpdateOrderItemIsReturnableByItemStatePlugin(), |
194
|
|
|
new UpdateOrderItemIsReturnableByGlobalReturnableNumberOfDaysPlugin(), |
195
|
|
|
new CurrencyIsoCodeOrderItemExpanderPlugin(), |
196
|
|
|
new ConfiguredBundleOrderItemExpanderPlugin(), |
197
|
|
|
new ProductBundleOrderItemExpanderPlugin(), |
198
|
|
|
new ProductBundleOptionItemExpanderPlugin(), |
199
|
|
|
new ItemStateOrderItemExpanderPlugin(), |
200
|
|
|
new ProductConfigurationOrderItemExpanderPlugin(), |
201
|
|
|
new WarehouseOrderItemExpanderPlugin(), |
202
|
|
|
]; |
203
|
|
|
} |
204
|
|
|
|
205
|
|
|
/** |
206
|
|
|
* @return array<\Spryker\Zed\SalesExtension\Dependency\Plugin\SearchOrderExpanderPluginInterface> |
207
|
|
|
*/ |
208
|
|
|
protected function getSearchOrderExpanderPlugins(): array |
209
|
|
|
{ |
210
|
|
|
return [ |
211
|
|
|
new ItemMetadataSearchOrderExpanderPlugin(), |
212
|
|
|
new OrderAggregatedItemStateSearchOrderExpanderPlugin(), |
213
|
|
|
new IsCancellableSearchOrderExpanderPlugin(), |
214
|
|
|
new IsAmendableOrderSearchOrderExpanderPlugin(), |
215
|
|
|
]; |
216
|
|
|
} |
217
|
|
|
|
218
|
|
|
/** |
219
|
|
|
* @return array<\Spryker\Zed\SalesExtension\Dependency\Plugin\OrderItemsPostSavePluginInterface> |
220
|
|
|
*/ |
221
|
|
|
protected function getOrderItemsPostSavePlugins(): array |
222
|
|
|
{ |
223
|
|
|
return [ |
224
|
|
|
new ConfiguredBundlesOrderItemsPostSavePlugin(), |
225
|
|
|
new ProductConfigurationOrderItemsPostSavePlugin(), |
226
|
|
|
new ItemMetadataOrderItemsPostSavePlugin(), |
227
|
|
|
new GiftCardOrderItemsPostSavePlugin(), |
228
|
|
|
new ProductOptionOrderItemsPostSavePlugin(), |
229
|
|
|
]; |
230
|
|
|
} |
231
|
|
|
|
232
|
|
|
/** |
233
|
|
|
* @return list<\Spryker\Zed\SalesExtension\Dependency\Plugin\SalesExpensePreDeletePluginInterface> |
234
|
|
|
*/ |
235
|
|
|
protected function getSalesExpensePreDeletePlugins(): array |
236
|
|
|
{ |
237
|
|
|
return [ |
|
|
|
|
238
|
|
|
new SalesDiscountSalesExpensePreDeletePlugin(), |
239
|
|
|
]; |
240
|
|
|
} |
241
|
|
|
|
242
|
|
|
/** |
243
|
|
|
* @return list<\Spryker\Zed\SalesExtension\Dependency\Plugin\SalesOrderItemCollectionPreDeletePluginInterface> |
244
|
|
|
*/ |
245
|
|
|
protected function getSalesOrderItemCollectionPreDeletePlugins(): array |
246
|
|
|
{ |
247
|
|
|
return [ |
248
|
|
|
new DiscountSalesOrderItemCollectionPreDeletePlugin(), |
249
|
|
|
new ItemMetadataSalesOrderItemCollectionPreDeletePlugin(), |
250
|
|
|
new OmsItemHistorySalesOrderItemCollectionPreDeletePlugin(), |
251
|
|
|
new ProductOptionSalesOrderItemCollectionPreDeletePlugin(), |
252
|
|
|
new SalesConfigurableBundleSalesOrderItemCollectionPreDeletePlugin(), |
253
|
|
|
new SalesProductConfigurationSalesOrderItemCollectionPreDeletePlugin(), |
254
|
|
|
new GiftCardSalesOrderItemCollectionPreDeletePlugin(), |
255
|
|
|
new NopaymentSalesOrderItemCollectionPreDeletePlugin(), |
256
|
|
|
new SalesReclamationSalesOrderItemCollectionPreDeletePlugin(), |
257
|
|
|
]; |
258
|
|
|
} |
259
|
|
|
|
260
|
|
|
/** |
261
|
|
|
* @return list<\Spryker\Zed\SalesExtension\Dependency\Plugin\SalesOrderItemCollectionPostUpdatePluginInterface> |
262
|
|
|
*/ |
263
|
|
|
protected function getOrderItemCollectionPostUpdatePlugins(): array |
264
|
|
|
{ |
265
|
|
|
return [ |
266
|
|
|
new SalesConfiguredBundlesSalesOrderItemCollectionPostUpdatePlugin(), |
267
|
|
|
new SalesProductConfigurationSalesOrderItemCollectionPostUpdatePlugin(), |
268
|
|
|
new ItemMetadataSalesOrderItemCollectionPostUpdatePlugin(), |
269
|
|
|
new ProductOptionSalesOrderItemCollectionPostUpdatePlugin(), |
270
|
|
|
]; |
271
|
|
|
} |
272
|
|
|
|
273
|
|
|
/** |
274
|
|
|
* @return list<\Spryker\Zed\SalesExtension\Dependency\Plugin\OrderItemInitialStateProviderPluginInterface> |
275
|
|
|
*/ |
276
|
|
|
protected function getOrderItemInitialStateProviderPlugins(): array |
277
|
|
|
{ |
278
|
|
|
return [ |
|
|
|
|
279
|
|
|
new DefaultOrderItemInitialStateProviderPlugin(), |
280
|
|
|
]; |
281
|
|
|
} |
282
|
|
|
|
283
|
|
|
/** |
284
|
|
|
* @return list<\Spryker\Zed\SalesExtension\Dependency\Plugin\OrderItemInitialStateProviderPluginInterface> |
285
|
|
|
*/ |
286
|
|
|
protected function getOrderItemInitialStateProviderPluginsForOrderAmendment(): array |
287
|
|
|
{ |
288
|
|
|
return [ |
|
|
|
|
289
|
|
|
new OrderAmendmentDefaultOrderItemInitialStateProviderPlugin(), |
290
|
|
|
]; |
291
|
|
|
} |
292
|
|
|
} |
293
|
|
|
|
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