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

Feature: dev:class:plugin:list #164

Open
robbieaverill opened this issue Dec 23, 2015 · 1 comment
Open

Feature: dev:class:plugin:list #164

robbieaverill opened this issue Dec 23, 2015 · 1 comment

Comments

@robbieaverill
Copy link
Contributor

Feature request: It would be great to be able to pass a class name into a command like dev:class:plugin:list and have it show which plugins are subscribed to methods on the class, or by specific methods, sorted by the sort order and indicating whether they are active or disabled.

Example descriptions:

$ n98-magerun2.phar | grep dev:class:plugin:list
 dev:class:plugin:list                     Lists plugins for a class name or class and public function name

Example listing all plugins attached to a class:

$ n98-magerun2.phar dev:class:plugin:list Magento\Class\Name\Here

Plugins on: Magento\Class\Name\Here

+------------------------+------------------------+---------------------+--------+-------+--------+
| Plugin name            | Plugin class           | Method observed     | Type   | Order | Active |
+------------------------+------------------------+---------------------+--------+-------+--------+
| vendor-package-plugin  | Vendor\Package\Plugin  | somePublicMethod    | around | 10    | 1      |
| another-package-plugin | Another\Package\Plugin | anotherPublicMethod | before | 50    | 0      |
| third-package-plugin   | Third\Package\Plugin   | anotherPublicMethod | after  | 50    | 1      |
+------------------------+------------------------+---------------------+--------+-------+--------+

Example listing all plugins attached to a class's particular method:

$ n98-magerun2.phar dev:class:plugin:list Magento\Class\Name\Here::somePublicMethod()

Plugins on: Magento\Class\Name\Here::somePublicMethod()

+------------------------+------------------------+--------+-------+--------+
| Plugin name            | Plugin class           | Type   | Order | Active |
+------------------------+------------------------+--------+-------+--------+
| vendor-package-plugin  | Vendor\Package\Plugin  | around | 10    | 1      |
| another-package-plugin | Another\Package\Plugin | before | 20    | 0      |
| third-package-plugin   | Third\Package\Plugin   | after  | 30    | 1      |
+------------------------+------------------------+--------+-------+--------+

Optional extras:

  • A filter for active e.g. --active 1 or --active 0
  • A filter for type e.g. --type before, --type after or --type around
  • Possibly a filter for the method name instead of putting it onto the end of the class name as above

Would all be read from XML configuration.

@cmuench
Copy link
Member

cmuench commented Sep 1, 2023

This is partially covered by bin/magento dev:di:info command.

@cmuench cmuench closed this as completed Sep 12, 2023
@cmuench cmuench reopened this Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants