-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
magento/devdocs#6535: Clarify behavior of plugins in Plugins (Interceptors) topic #6811
Conversation
An admin must run tests on this PR before it can be merged. |
The execution will be in this order: | ||
|
||
* `PluginA::beforeDispatch()` | ||
* `PluginB::beforeDispatch()` | ||
* `PluginB::aroundDispatch()` (Magento calls the first half until `callable`) | ||
* `PluginB::aroundDispatch()` (Magento calls the first half after `callable`) |
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 not sure this statement is 100% correct. The around plugin is supposed to be executed before callable and after callable. In the modified example it's being executed two times before callable.
* `PluginB::aroundDispatch()` (Magento calls the first half after `callable`)
* `PluginB::aroundDispatch()` (Magento calls the second half after `callable`)
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.
running tests |
Hi @atwixfirster, thank you for your contribution! |
Purpose of this pull request
This pull request (PR) provides additional explanations for plugins order execution regarding to #6535.
Affected DevDocs pages
Links to Magento source code
whatsnew
Added execution order examples to Plugin (Interceptors).