Skip to content

Commit 1759898

Browse files
committed
Add deprecation to AbstractAction, deprecate methods that should never been public, add link to DevBlog
1 parent d4a9098 commit 1759898

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/internal/Magento/Framework/App/Action/AbstractAction.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
use Magento\Framework\App\RequestInterface;
1111
use Magento\Framework\App\ResponseInterface;
1212

13-
abstract class AbstractAction implements \Magento\Framework\App\ActionInterface
13+
/**
14+
* @deprecated Use \Magento\Framework\App\ActionInterface
15+
* @see https://community.magento.com/t5/Magento-DevBlog/Decomposition-of-Magento-Controllers/ba-p/430883
16+
*/
17+
abstract class AbstractAction implements ActionInterface
1418
{
1519
/**
1620
* @var \Magento\Framework\App\RequestInterface
@@ -56,6 +60,7 @@ abstract public function dispatch(RequestInterface $request);
5660
* Retrieve request object
5761
*
5862
* @return \Magento\Framework\App\RequestInterface
63+
* @deprecated This method should not be used anymore. Inject `RequestInterface` into constructor instead
5964
*/
6065
public function getRequest()
6166
{
@@ -66,6 +71,7 @@ public function getRequest()
6671
* Retrieve response object
6772
*
6873
* @return \Magento\Framework\App\ResponseInterface
74+
* @deprecated This method should not be used anymore. Inject `ResponseInterface` into constructor instead
6975
*/
7076
public function getResponse()
7177
{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* Action classes that do not extend from this class will lose this behavior and might not function correctly
2525
*
2626
* @deprecated Use \Magento\Framework\App\ActionInterface
27+
* @see https://community.magento.com/t5/Magento-DevBlog/Decomposition-of-Magento-Controllers/ba-p/430883
2728
*
2829
* phpcs:disable Magento2.Classes.AbstractApi
2930
* @api

0 commit comments

Comments
 (0)