Skip to content

#27962 Migrate Plugin out of Framework (to Theme module) #27965

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

Merged

Conversation

lbajsarowicz
Copy link
Contributor

@lbajsarowicz lbajsarowicz commented Apr 24, 2020

Description (*)

During my recent changes related to Controllers decomposition, I renamed the existing plugin. Some random Magento Architect says that it was never allowed to add Plugin to \Magento\Framework namespace and it was never allowed:

image

I had no idea about that (is there information missing in DevDocs / coding standards / static checks?). So I'm moving plugin out of \Magento\Framework area, as it's against Magento Best Practices.

(If it was never allowed, why it's there since 2016?)

namespace Magento\Framework\App\Action\Plugin;
use Magento\Framework\Message\MessageInterface;
class Design

Related Pull Requests

Fixed Issues (if relevant)

  1. fixes Plugins in \Magento\Framework namespace #27962

Manual testing scenarios (*)

N/A

Questions or comments

N/A

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 assigned ihor-sviziev Apr 24, 2020
@ihor-sviziev ihor-sviziev added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Apr 24, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7484 has been created to process this Pull Request
✳️ @ihor-sviziev, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @lbajsarowicz,
Could you review failing MHI test and update your PR?

Also I see that you moved just one plugin, could you move all plugins to corresponding modules at once?

@ihor-sviziev ihor-sviziev added the Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. label Apr 28, 2020
ihor-sviziev
ihor-sviziev previously approved these changes May 4, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7484 has been created to process this Pull Request

@engcom-Delta
Copy link
Contributor

✔️ QA passed
Was checked that Luma theme is applied and loaded without errors
Was checked that Blank theme is applied and loaded without errors
Was checked that different themes are applied and loaded without errors on different store views
Result:
image

image

…ugin

# Conflicts:
#	app/code/Magento/Theme/Test/Unit/Plugin/LoadDesignPluginTest.php
@ihor-sviziev
Copy link
Contributor

@magento run all tests

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7484 has been created to process this Pull Request

@engcom-Echo engcom-Echo requested a review from slavvka May 22, 2020 07:00
@magento-engcom-team
Copy link
Contributor

Hi @slavvka, thank you for the review.
ENGCOM-7484 has been created to process this Pull Request

@lbajsarowicz
Copy link
Contributor Author

@magento run all tests

I'd like to verify if there are no issues with current mainline.

@engcom-Delta engcom-Delta added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Jun 19, 2020
@magento-engcom-team magento-engcom-team merged commit 34cc977 into magento:2.4-develop Jun 24, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jun 24, 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.

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 Award: bug fix Component: Store Component: Theme Partner: Mediotype partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Plugins in \Magento\Framework namespace
6 participants