What problem does it solve?
This Skill helps you configure and troubleshoot Magento 2 dependency injection so modules use the right implementations, constructor arguments, and scoped bindings without direct ObjectManager calls.
Core Features & Use Cases
- Interface Preferences: Bind service contracts to concrete implementations in global or area-scoped di.xml files.
- Virtual Types and Proxies: Adjust constructor arguments and defer expensive dependencies without creating unnecessary subclasses.
- DI Troubleshooting: Diagnose compile errors, circular dependencies, and incorrect wiring in Magento modules.
- Use Case: When a Magento module needs a different logger, data provider, or repository implementation in adminhtml versus frontend, this Skill guides the safest DI configuration.
Quick Start
Ask this Skill to review your Magento 2 dependency injection setup and tell you exactly what to change in di.xml and constructors.