Skip to content

Commit 6a2e353

Browse files
committed
Make sure that the optional dependancies are last in the constructor
1 parent 298d3c5 commit 6a2e353

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

app/code/Magento/Captcha/Controller/Adminhtml/Refresh/Refresh.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ class Refresh extends \Magento\Backend\App\Action
2121
protected $captchaHelper;
2222

2323
/**
24+
* Refresh constructor.
2425
* @param \Magento\Backend\App\Action\Context $context
25-
* @param \Magento\Framework\Serialize\SerializerInterface|null $serializer
2626
* @param \Magento\Captcha\Helper\Data $captchaHelper
27+
* @param \Magento\Framework\Serialize\SerializerInterface|null $serializer
2728
* @throws \RuntimeException
2829
*/
2930
public function __construct(
3031
\Magento\Backend\App\Action\Context $context,
31-
\Magento\Framework\Serialize\SerializerInterface $serializer = null,
32-
\Magento\Captcha\Helper\Data $captchaHelper
32+
\Magento\Captcha\Helper\Data $captchaHelper,
33+
\Magento\Framework\Serialize\SerializerInterface $serializer = null
3334
) {
3435
parent::__construct($context);
3536
$this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()

app/code/Magento/Captcha/Model/Customer/Plugin/AjaxLogin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public function __construct(
4848
CaptchaHelper $helper,
4949
SessionManagerInterface $sessionManager,
5050
JsonFactory $resultJsonFactory,
51-
\Magento\Framework\Serialize\SerializerInterface $serializer = null,
52-
array $formIds
51+
array $formIds,
52+
\Magento\Framework\Serialize\SerializerInterface $serializer = null
5353
) {
5454
$this->helper = $helper;
5555
$this->sessionManager = $sessionManager;

app/code/Magento/Captcha/Test/Unit/Model/Customer/Plugin/AjaxLoginTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ protected function setUp()
9696
$this->captchaHelperMock,
9797
$this->sessionManagerMock,
9898
$this->jsonFactoryMock,
99-
$this->serializerMock,
100-
$this->formIds
99+
$this->formIds,
100+
$this->serializerMock
101101
);
102102
}
103103

0 commit comments

Comments
 (0)