Skip to content

Commit

Permalink
Add deprecation to AbstractAction, deprecate methods that should neve…
Browse files Browse the repository at this point in the history
…r been public, add link to DevBlog
  • Loading branch information
lbajsarowicz committed Apr 24, 2020
1 parent d4a9098 commit 1759898
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/internal/Magento/Framework/App/Action/AbstractAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
use Magento\Framework\App\RequestInterface;
use Magento\Framework\App\ResponseInterface;

abstract class AbstractAction implements \Magento\Framework\App\ActionInterface
/**
* @deprecated Use \Magento\Framework\App\ActionInterface
* @see https://community.magento.com/t5/Magento-DevBlog/Decomposition-of-Magento-Controllers/ba-p/430883
*/
abstract class AbstractAction implements ActionInterface
{
/**
* @var \Magento\Framework\App\RequestInterface
Expand Down Expand Up @@ -56,6 +60,7 @@ abstract public function dispatch(RequestInterface $request);
* Retrieve request object
*
* @return \Magento\Framework\App\RequestInterface
* @deprecated This method should not be used anymore. Inject `RequestInterface` into constructor instead
*/
public function getRequest()
{
Expand All @@ -66,6 +71,7 @@ public function getRequest()
* Retrieve response object
*
* @return \Magento\Framework\App\ResponseInterface
* @deprecated This method should not be used anymore. Inject `ResponseInterface` into constructor instead
*/
public function getResponse()
{
Expand Down
1 change: 1 addition & 0 deletions lib/internal/Magento/Framework/App/Action/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Action classes that do not extend from this class will lose this behavior and might not function correctly
*
* @deprecated Use \Magento\Framework\App\ActionInterface
* @see https://community.magento.com/t5/Magento-DevBlog/Decomposition-of-Magento-Controllers/ba-p/430883
*
* phpcs:disable Magento2.Classes.AbstractApi
* @api
Expand Down

0 comments on commit 1759898

Please sign in to comment.