Interceptors with generated code in Magento
Learn Magento generated code, Interceptor classes, and setup di compile for fixing constructor type mismatch errors.
Lesson Content
When we start injecting dependencies into constructors, we may run into odd errors from time to time that complain about there being a type mismatch within constructors. This wonβt make much sense to you, because your constructors will look just fine.
But this error comes from classes that Magento creates on the fly for certain situations while in developer mode, and one of those situations is for controllers. Magento places this code in the generated/code folder.
Note that if you are using my docker-magento setup, this directory is not automatically synced for performance reasons, so yo...
Join the discussion!
Comments
Want to comment on this lesson?
Enroll in this course to leave comments.