Skip to content

Commit c05293c

Browse files
committed
Changed constructor to use an interface
The front controller only accepts an HTTP response object. The front controller now has a direct dependency on the Response\Http class, which is not correct. The front controller should not care which response object will be injected only that it will adhire the ResponseInterface. So changed this constructor to accept a ResponseInterface which in di.xml is being replaced by the Response\Http class.
1 parent bd1655b commit c05293c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/Magento/Framework/App/FrontController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ class FrontController implements FrontControllerInterface
1515
protected $_routerList;
1616

1717
/**
18-
* @var \Magento\Framework\App\Response\Http
18+
* @var \Magento\Framework\App\ResponseInterface
1919
*/
2020
protected $response;
2121

2222
/**
2323
* @param RouterList $routerList
24-
* @param \Magento\Framework\App\Response\Http $response
24+
* @param \Magento\Framework\App\ResponseInterface $response
2525
*/
2626
public function __construct(
2727
RouterList $routerList,
28-
\Magento\Framework\App\Response\Http $response
28+
\Magento\Framework\App\ResponseInterface $response
2929
) {
3030
$this->_routerList = $routerList;
3131
$this->response = $response;

0 commit comments

Comments
 (0)