Skip to content

Commit f1c8ad5

Browse files
Ensure constructor change is backwards compatible
1 parent 54a11eb commit f1c8ad5

File tree

1 file changed

+4
-4
lines changed
  • app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier

1 file changed

+4
-4
lines changed

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,19 @@ class Categories extends AbstractModifier
9898
* @param DbHelper $dbHelper
9999
* @param UrlInterface $urlBuilder
100100
* @param ArrayManager $arrayManager
101-
* @param Session $session
102101
* @param SerializerInterface $serializer
103102
* @param AuthorizationInterface $authorization
103+
* @param Session $session
104104
*/
105105
public function __construct(
106106
LocatorInterface $locator,
107107
CategoryCollectionFactory $categoryCollectionFactory,
108108
DbHelper $dbHelper,
109109
UrlInterface $urlBuilder,
110110
ArrayManager $arrayManager,
111-
Session $session,
112111
SerializerInterface $serializer = null,
113-
AuthorizationInterface $authorization = null
112+
AuthorizationInterface $authorization = null,
113+
Session $session = null
114114
) {
115115
$this->locator = $locator;
116116
$this->categoryCollectionFactory = $categoryCollectionFactory;
@@ -119,7 +119,7 @@ public function __construct(
119119
$this->arrayManager = $arrayManager;
120120
$this->serializer = $serializer ?: ObjectManager::getInstance()->get(SerializerInterface::class);
121121
$this->authorization = $authorization ?: ObjectManager::getInstance()->get(AuthorizationInterface::class);
122-
$this->session = $session;
122+
$this->session = $session ?: ObjectManager::getInstance()->get(Session::class);
123123
}
124124

125125
/**

0 commit comments

Comments
 (0)