-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate AbstractAction and it's public methods #27964
Deprecate AbstractAction and it's public methods #27964
Conversation
Hi @lbajsarowicz. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
use Magento\Framework\App\RequestInterface; | ||
use Magento\Framework\App\ResponseInterface; | ||
use Magento\Framework\Controller\Result\RedirectFactory; | ||
use Magento\Framework\Controller\ResultFactory; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid such changes in future pull requests, it needs to be a separate effort rather than noise in regular diffs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed noise for you.
…r been public, add link to DevBlog
467a73b
to
1759898
Compare
@orlangur Reverted the "noise" and rebased to hide the traces. |
@@ -56,6 +60,7 @@ public function __construct( | |||
* Retrieve request object | |||
* | |||
* @return \Magento\Framework\App\RequestInterface | |||
* @deprecated This method should not be used anymore. Inject `RequestInterface` into constructor instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not deprecate methods, but classes.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to:
/**
* @deprecated Inheritance was eliminated, composition should be used instead.
* @see \Magento\Framework\App\ActionInterface
*/
@see
tag will allow navigate class in IDE.
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to
/**
* @deprecated Inheritance was eliminated, composition should be used instead.
* @see \Magento\Framework\App\ActionInterface
*/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep both links, just to have more info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's forbidden to add links to code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lenaorobei @lbajsarowicz Could you explain where it declared and why?
From my perspective add link that could describe more detailed why class is deprecated and what to use instead is really good option!
I even checked documentation for phpdoc - @see
tag could contains URL to documentation https://docs.phpdoc.org/latest/references/phpdoc/tags/see.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ihor-sviziev we can put links to official documentation only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got your point. Thx
Hi @lbajsarowicz, thank you for your contribution! |
Description (*)
Abstract Action and Action class should not be used
Related Pull Requests
N/A
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
N/A
Questions or comments
CC: @lenaorobei
Contribution checklist (*)