33
44namespace IntegerNet \SessionUnblocker \Plugin ;
55
6- use \Magento \Framework \Session \Generic as GenericSession ;
7- use \Magento \Customer \Model \Session as CustomerSession ;
8- use \Magento \Framework \Message \Session as MessageSession ;
9- use \Magento \Catalog \Model \Session as CatalogSession ;
6+ use Magento \Framework \Session \Generic as GenericSession ;
7+ use Magento \Framework \Session \SessionManagerInterface ;
108
119/**
1210 * We are writing this plugin to make sure sessions are all loaded before
@@ -25,10 +23,7 @@ class SectionLoadControllerPlugin
2523{
2624 /**
2725 * @param GenericSession $genericSession
28- * @param CustomerSession $customerSession
29- * @param MessageSession $messageSession
30- * @param CatalogSession $catalogSession
31- * @param GenericSession $reviewSession
26+ * @param SessionManagerInterface[] $additionalSessions
3227 *
3328 * Disabling 3 PHPCS rules because:
3429 * 1 - We are well aware that we normally shouldn't call Sessions without
@@ -43,10 +38,7 @@ class SectionLoadControllerPlugin
4338 */
4439 public function __construct (
4540 GenericSession $ genericSession ,
46- CustomerSession $ customerSession ,
47- MessageSession $ messageSession ,
48- CatalogSession $ catalogSession ,
49- GenericSession $ reviewSession //virtualType
41+ array $ additionalSessions = []
5042 ) {
5143 /*
5244 * This is earliest moment where we can close the session,
0 commit comments