From a439fd7038a4793819ecc770ec692d2c0df2ed8f Mon Sep 17 00:00:00 2001 From: Kirill Morozov Date: Tue, 17 Sep 2024 09:54:40 -0400 Subject: [PATCH] Remove harmful warning Update plugins.md Align with Mage-OS. Around plugins are good and explicitly show up in a stack trace, performance degradation is minuscule by comparison with hours of debugging and understanding combinations of plugins. https://devdocs.mage-os.org/docs/main/plugins#content-2-after-plugin --- src/pages/development/components/plugins.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/pages/development/components/plugins.md b/src/pages/development/components/plugins.md index 703d7fda6..26c94d380 100644 --- a/src/pages/development/components/plugins.md +++ b/src/pages/development/components/plugins.md @@ -231,11 +231,6 @@ If an argument is optional in the observed method, then the after method should The application runs the code in around methods before and after their observed methods. Using these methods allow you to override an observed method. Around methods must have the same name as the observed method with 'around' as the prefix. - - -Avoid using around method plugins when they are not required because they increase stack traces and affect performance. -The only use case for around method plugins is when the execution of all further plugins and original methods need termination. -Use after method plugins if you require arguments for replacing or altering function results. Before the list of the original method's arguments, around methods receive a `callable` that will allow a call to the next method in the chain. When your code executes the `callable`, the application calls the next plugin or the observed function.