Skip to content
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

Merged

Conversation

lbajsarowicz
Copy link
Contributor

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 (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Apr 24, 2020

Hi @lbajsarowicz. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@ghost ghost added this to Pending Review in Pull Requests Dashboard Apr 24, 2020
@dmytro-ch dmytro-ch self-assigned this Apr 24, 2020
use Magento\Framework\App\RequestInterface;
use Magento\Framework\App\ResponseInterface;
use Magento\Framework\Controller\Result\RedirectFactory;
use Magento\Framework\Controller\ResultFactory;
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed noise for you.

@ghost ghost assigned orlangur and lbajsarowicz Apr 24, 2020
@lbajsarowicz
Copy link
Contributor Author

@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
Copy link
Contributor

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.

@ghost ghost assigned lenaorobei Apr 24, 2020
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
Copy link
Contributor

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
Copy link
Contributor

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
 */

Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

@ihor-sviziev ihor-sviziev Apr 27, 2020

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

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got your point. Thx

@lenaorobei lenaorobei added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Apr 24, 2020
@ghost ghost assigned ihor-sviziev Apr 27, 2020
@ghost ghost moved this from Pending Review to Ready for Testing in Pull Requests Dashboard Apr 27, 2020
@lenaorobei lenaorobei moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Apr 27, 2020
@lenaorobei lenaorobei moved this from Testing in Progress to Merge in Progress in Pull Requests Dashboard Apr 27, 2020
@ihor-sviziev ihor-sviziev removed their assignment Apr 27, 2020
@slavvka slavvka added this to the 2.4.0 milestone Apr 27, 2020
@magento-engcom-team magento-engcom-team merged commit a021cff into magento:2.4-develop Apr 29, 2020
@m2-assistant
Copy link

m2-assistant bot commented Apr 29, 2020

Hi @lbajsarowicz, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@ghost ghost moved this from Merge in Progress to Recently Merged in Pull Requests Dashboard Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Component: App Partner: Mediotype partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.4
Projects
Pull Requests Dashboard
  
Recently Merged
Development

Successfully merging this pull request may close these issues.

None yet

7 participants