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\Yves\CustomerPage; |
11
|
|
|
|
12
|
|
|
use Spryker\Yves\Kernel\Container; |
13
|
|
|
use Spryker\Yves\MultiFactorAuth\Plugin\AuthenticationHandler\Customer\CustomerMultiFactorAuthenticationHandlerPlugin; |
14
|
|
|
use SprykerShop\Yves\AgentPage\Plugin\FixAgentTokenAfterCustomerAuthenticationSuccessPlugin; |
15
|
|
|
use SprykerShop\Yves\AgentPage\Plugin\Security\UpdateAgentTokenAfterCustomerAuthenticationSuccessPlugin; |
16
|
|
|
use SprykerShop\Yves\CompanyPage\Plugin\CustomerPage\BusinessOnBehalfCompanyUserRedirectAfterLoginStrategyPlugin; |
17
|
|
|
use SprykerShop\Yves\CompanyPage\Plugin\CustomerPage\CompanyBusinessUnitOrderSearchFormExpanderPlugin; |
18
|
|
|
use SprykerShop\Yves\CompanyPage\Plugin\CustomerPage\CompanyBusinessUnitOrderSearchFormHandlerPlugin; |
19
|
|
|
use SprykerShop\Yves\CompanyPage\Plugin\CustomerPage\CompanyUserPreAuthUserCheckPlugin; |
20
|
|
|
use SprykerShop\Yves\CompanyUserInvitationPage\Plugin\CompanyUserInvitationPreRegistrationCustomerTransferExpanderPlugin; |
21
|
|
|
use SprykerShop\Yves\CustomerPage\CustomerPageDependencyProvider as SprykerShopCustomerPageDependencyProvider; |
22
|
|
|
use SprykerShop\Yves\CustomerPage\Plugin\CustomerPage\RedirectUriCustomerRedirectStrategyPlugin; |
23
|
|
|
use SprykerShop\Yves\CustomerReorderWidget\Plugin\CustomerPage\CustomerReorderWidgetPlugin; |
24
|
|
|
use SprykerShop\Yves\SessionAgentValidation\Plugin\CustomerPage\UpdateAgentSessionAfterCustomerAuthenticationSuccessPlugin; |
25
|
|
|
|
26
|
|
|
class CustomerPageDependencyProvider extends SprykerShopCustomerPageDependencyProvider |
27
|
|
|
{ |
28
|
|
|
/** |
29
|
|
|
* @var string |
30
|
|
|
*/ |
31
|
|
|
public const CLIENT_PYZ_SESSION = 'CLIENT_PYZ_SESSION'; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @param \Spryker\Yves\Kernel\Container $container |
35
|
|
|
* |
36
|
|
|
* @return \Spryker\Yves\Kernel\Container |
37
|
|
|
*/ |
38
|
|
|
public function provideDependencies(Container $container): Container |
39
|
|
|
{ |
40
|
|
|
$container = parent::provideDependencies($container); |
41
|
|
|
|
42
|
|
|
$container = $this->addPyzSessionClient($container); |
43
|
|
|
|
44
|
|
|
return $container; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @return array<string> |
49
|
|
|
*/ |
50
|
|
|
protected function getCustomerOverviewWidgetPlugins(): array |
51
|
|
|
{ |
52
|
|
|
return [ |
53
|
|
|
CustomerReorderWidgetPlugin::class, |
54
|
|
|
]; |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @return array<string> |
59
|
|
|
*/ |
60
|
|
|
protected function getCustomerOrderListWidgetPlugins(): array |
61
|
|
|
{ |
62
|
|
|
return [ |
63
|
|
|
CustomerReorderWidgetPlugin::class, |
64
|
|
|
]; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @return array<string> |
69
|
|
|
*/ |
70
|
|
|
protected function getCustomerOrderViewWidgetPlugins(): array |
71
|
|
|
{ |
72
|
|
|
return [ |
73
|
|
|
CustomerReorderWidgetPlugin::class, |
74
|
|
|
]; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\PreRegistrationCustomerTransferExpanderPluginInterface> |
79
|
|
|
*/ |
80
|
|
|
protected function getPreRegistrationCustomerTransferExpanderPlugins(): array |
81
|
|
|
{ |
82
|
|
|
return [ |
83
|
|
|
new CompanyUserInvitationPreRegistrationCustomerTransferExpanderPlugin(), #BulkImportCompanyUserInvitationsFeature |
84
|
|
|
]; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\CustomerRedirectStrategyPluginInterface> |
89
|
|
|
*/ |
90
|
|
|
protected function getAfterLoginCustomerRedirectPlugins(): array |
91
|
|
|
{ |
92
|
|
|
return [ |
93
|
|
|
new BusinessOnBehalfCompanyUserRedirectAfterLoginStrategyPlugin(), #BusinessOnBehalfFeature |
94
|
|
|
new RedirectUriCustomerRedirectStrategyPlugin(), |
95
|
|
|
]; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return list<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\AfterCustomerAuthenticationSuccessPluginInterface> |
|
|
|
|
100
|
|
|
*/ |
101
|
|
|
protected function getAfterCustomerAuthenticationSuccessPlugins(): array |
102
|
|
|
{ |
103
|
|
|
return [ |
|
|
|
|
104
|
|
|
new FixAgentTokenAfterCustomerAuthenticationSuccessPlugin(), |
|
|
|
|
105
|
|
|
new UpdateAgentTokenAfterCustomerAuthenticationSuccessPlugin(), |
106
|
|
|
new UpdateAgentSessionAfterCustomerAuthenticationSuccessPlugin(), |
107
|
|
|
]; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @param \Spryker\Yves\Kernel\Container $container |
112
|
|
|
* |
113
|
|
|
* @return \Spryker\Yves\Kernel\Container |
114
|
|
|
*/ |
115
|
|
|
protected function addPyzSessionClient(Container $container): Container |
116
|
|
|
{ |
117
|
|
|
$container->set(static::CLIENT_PYZ_SESSION, function (Container $container) { |
118
|
|
|
return $container->getLocator()->session()->client(); |
119
|
|
|
}); |
120
|
|
|
|
121
|
|
|
return $container; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\OrderSearchFormExpanderPluginInterface> |
126
|
|
|
*/ |
127
|
|
|
protected function getOrderSearchFormExpanderPlugins(): array |
128
|
|
|
{ |
129
|
|
|
return [ |
130
|
|
|
new CompanyBusinessUnitOrderSearchFormExpanderPlugin(), |
131
|
|
|
]; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\OrderSearchFormHandlerPluginInterface> |
136
|
|
|
*/ |
137
|
|
|
protected function getOrderSearchFormHandlerPlugins(): array |
138
|
|
|
{ |
139
|
|
|
return [ |
140
|
|
|
new CompanyBusinessUnitOrderSearchFormHandlerPlugin(), |
141
|
|
|
]; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\PreAuthUserCheckPluginInterface> |
146
|
|
|
*/ |
147
|
|
|
protected function getPreAuthUserCheckPlugins(): array |
148
|
|
|
{ |
149
|
|
|
return [ |
150
|
|
|
new CompanyUserPreAuthUserCheckPlugin(), |
151
|
|
|
]; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\AuthenticationHandlerPluginInterface> |
156
|
|
|
*/ |
157
|
|
|
protected function getCustomerAuthenticationHandlerPlugins(): array |
158
|
|
|
{ |
159
|
|
|
return [ |
160
|
|
|
new CustomerMultiFactorAuthenticationHandlerPlugin(), |
161
|
|
|
]; |
162
|
|
|
} |
163
|
|
|
} |
164
|
|
|
|
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