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\SessionAgentValidation\Plugin\CustomerPage\UpdateAgentSessionAfterCustomerAuthenticationSuccessPlugin; |
24
|
|
|
|
25
|
|
|
class CustomerPageDependencyProvider extends SprykerShopCustomerPageDependencyProvider |
26
|
|
|
{ |
27
|
|
|
/** |
28
|
|
|
* @var string |
29
|
|
|
*/ |
30
|
|
|
public const CLIENT_PYZ_SESSION = 'CLIENT_PYZ_SESSION'; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @param \Spryker\Yves\Kernel\Container $container |
34
|
|
|
* |
35
|
|
|
* @return \Spryker\Yves\Kernel\Container |
36
|
|
|
*/ |
37
|
|
|
public function provideDependencies(Container $container): Container |
38
|
|
|
{ |
39
|
|
|
$container = parent::provideDependencies($container); |
40
|
|
|
|
41
|
|
|
$container = $this->addPyzSessionClient($container); |
42
|
|
|
|
43
|
|
|
return $container; |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\PreRegistrationCustomerTransferExpanderPluginInterface> |
48
|
|
|
*/ |
49
|
|
|
protected function getPreRegistrationCustomerTransferExpanderPlugins(): array |
50
|
|
|
{ |
51
|
|
|
return [ |
52
|
|
|
new CompanyUserInvitationPreRegistrationCustomerTransferExpanderPlugin(), #BulkImportCompanyUserInvitationsFeature |
53
|
|
|
]; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\CustomerRedirectStrategyPluginInterface> |
58
|
|
|
*/ |
59
|
|
|
protected function getAfterLoginCustomerRedirectPlugins(): array |
60
|
|
|
{ |
61
|
|
|
return [ |
62
|
|
|
new BusinessOnBehalfCompanyUserRedirectAfterLoginStrategyPlugin(), #BusinessOnBehalfFeature |
63
|
|
|
new RedirectUriCustomerRedirectStrategyPlugin(), |
64
|
|
|
]; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @return list<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\AfterCustomerAuthenticationSuccessPluginInterface> |
|
|
|
|
69
|
|
|
*/ |
70
|
|
|
protected function getAfterCustomerAuthenticationSuccessPlugins(): array |
71
|
|
|
{ |
72
|
|
|
return [ |
|
|
|
|
73
|
|
|
new FixAgentTokenAfterCustomerAuthenticationSuccessPlugin(), |
|
|
|
|
74
|
|
|
new UpdateAgentTokenAfterCustomerAuthenticationSuccessPlugin(), |
75
|
|
|
new UpdateAgentSessionAfterCustomerAuthenticationSuccessPlugin(), |
76
|
|
|
]; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @param \Spryker\Yves\Kernel\Container $container |
81
|
|
|
* |
82
|
|
|
* @return \Spryker\Yves\Kernel\Container |
83
|
|
|
*/ |
84
|
|
|
protected function addPyzSessionClient(Container $container): Container |
85
|
|
|
{ |
86
|
|
|
$container->set(static::CLIENT_PYZ_SESSION, function (Container $container) { |
87
|
|
|
return $container->getLocator()->session()->client(); |
88
|
|
|
}); |
89
|
|
|
|
90
|
|
|
return $container; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\OrderSearchFormExpanderPluginInterface> |
95
|
|
|
*/ |
96
|
|
|
protected function getOrderSearchFormExpanderPlugins(): array |
97
|
|
|
{ |
98
|
|
|
return [ |
99
|
|
|
new CompanyBusinessUnitOrderSearchFormExpanderPlugin(), |
100
|
|
|
]; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\OrderSearchFormHandlerPluginInterface> |
105
|
|
|
*/ |
106
|
|
|
protected function getOrderSearchFormHandlerPlugins(): array |
107
|
|
|
{ |
108
|
|
|
return [ |
109
|
|
|
new CompanyBusinessUnitOrderSearchFormHandlerPlugin(), |
110
|
|
|
]; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\PreAuthUserCheckPluginInterface> |
115
|
|
|
*/ |
116
|
|
|
protected function getPreAuthUserCheckPlugins(): array |
117
|
|
|
{ |
118
|
|
|
return [ |
119
|
|
|
new CompanyUserPreAuthUserCheckPlugin(), |
120
|
|
|
]; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\AuthenticationHandlerPluginInterface> |
125
|
|
|
*/ |
126
|
|
|
protected function getCustomerAuthenticationHandlerPlugins(): array |
127
|
|
|
{ |
128
|
|
|
return [ |
129
|
|
|
new CustomerMultiFactorAuthenticationHandlerPlugin(), |
130
|
|
|
]; |
131
|
|
|
} |
132
|
|
|
} |
133
|
|
|
|
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