Whenever I use Magento to troubleshoot a project-specific problem, I discover a cool functionality that I was unaware of. This time, use “bin/magento dev:di:info” with Magento!
If you supply a class as a string to this command, you will receive:
- The preferred class of this class or interface, or the preference.
- The parameters this preference receives, together with the required values and types for each
- Plugins that connect to this interface
- Any plugins for this interface’s relevant preference
ex: bin/magento dev:di:info “Magento\Catalog\Model\Category”
When attempting to figure out what is going on with all of the dependency injection information preferences set throughout your Magento store, this can be VERY helpful. Particularly when you are attempting to grasp Magento or have a truly challenging troubleshooting circumstance.