[New Rule] Proxies and interceptors MUST never be explicitly requested in constructors #18
Labels
accepted
New rule is accepted
event: MageTestFest2019
MageTestFest contributions
new rule
New feature implementation
Progress: good first issue
Issues is easy to get started with
technical guidelines
The rule is based on Magento Technical Guidelines
Rule
Proxies and interceptors MUST never be explicitly requested in constructors.
Source - Magento Technical Guidelines
Description
Proxies are used for lazy-loading. Details on DevDocs.
Proxies should be configured via
di.xml
file.Plugins (interceptors) modify the behavior of public class functions by intercepting a function call and running code before, after, or around that function call. Details on DevDocs.
Plugins should be declared via
di.xml
file.Implementation
Subscribe to the
T_CLASS
token and analyse__constructor
arguments.The text was updated successfully, but these errors were encountered: