Skip to content

Commit

Permalink
Ensure constructor change is backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
quangdo-aligent committed Mar 25, 2020
1 parent 54a11eb commit f1c8ad5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@ class Categories extends AbstractModifier
* @param DbHelper $dbHelper
* @param UrlInterface $urlBuilder
* @param ArrayManager $arrayManager
* @param Session $session
* @param SerializerInterface $serializer
* @param AuthorizationInterface $authorization
* @param Session $session
*/
public function __construct(
LocatorInterface $locator,
CategoryCollectionFactory $categoryCollectionFactory,
DbHelper $dbHelper,
UrlInterface $urlBuilder,
ArrayManager $arrayManager,
Session $session,
SerializerInterface $serializer = null,
AuthorizationInterface $authorization = null
AuthorizationInterface $authorization = null,
Session $session = null
) {
$this->locator = $locator;
$this->categoryCollectionFactory = $categoryCollectionFactory;
Expand All @@ -119,7 +119,7 @@ public function __construct(
$this->arrayManager = $arrayManager;
$this->serializer = $serializer ?: ObjectManager::getInstance()->get(SerializerInterface::class);
$this->authorization = $authorization ?: ObjectManager::getInstance()->get(AuthorizationInterface::class);
$this->session = $session;
$this->session = $session ?: ObjectManager::getInstance()->get(Session::class);
}

/**
Expand Down

0 comments on commit f1c8ad5

Please sign in to comment.