magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Create static test for action controllers #252

Closed lenaorobei closed 3 years ago

lenaorobei commented 4 years ago

Description (*)

Due to recent changes in https://github.com/magento/magento2/pull/26778#issuecomment-592766350 need to create static test that will check that controller classes implement ActionInterface and do not extend Action abstract class.

Expected behavior (*)

Static check fails if controller class extends Action.

Benefits

This will prevent using of deprecated ActionInterface.

m2-assistant[bot] commented 4 years ago

Hi @lenaorobei. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

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

@lenaorobei do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?


m2-assistant[bot] commented 4 years ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 4 years ago

@sdzhepa Can you please transfer this feature request to the appropriate repository?

Thank you in advance

sdzhepa commented 4 years ago

@lenaorobei cc: @engcom-Bravo Could you please clarify is it really new feature request or bug that should be fixed?

sdzhepa commented 4 years ago

Hello @lenaorobei

Thank you for feedback and your proposal!

Based on the description and label feature request the issue has been transferred to Magento Feature Request public repo.

swnsma commented 4 years ago

Hi @lenaorobei, Could you please clarify next:

naydav commented 4 years ago

Hi @lenaorobei, Could you please clarify next:

  • test must works only for files related to a PR;
  • test must works only for created files and ignore modified files; Am I right?

Hi @swnsma,

Sorry for the misunderstanding but the final decision about the controllers is still in active discussion. Thus, this task is not ready for development.

lenaorobei commented 3 years ago

Hi @swnsma, Sorry for the delay. Answering your questions.

test must works only for files related to a PR

Yes

test must work only for created files and ignore modified files;

Yes, you are right.

Thanks a lot for working on this.

swnsma commented 3 years ago

Here we go: https://github.com/magento/magento2/pull/29339

ihor-sviziev commented 3 years ago

https://github.com/magento/magento2/pull/26778 was already merged, so basically we have such static test. @lenaorobei @naydav @sdzhepa could you close this issue?

lenaorobei commented 3 years ago

@ihor-sviziev yes, sure!

Thanks again @swnsma! That's a great improvement.