When running a php bin/magento setup:di:compile you may have at some point run into the “Incorrect dependency in class” errors during the generation of the code. They look a little something like this: This happens when you include a class in your constructor that is already available inside $context. The solution to this problem is actually quite simple. Instead of… Read more →
![](https://www.dancarlyon.co.uk/wp-content/uploads/2018/02/magento-logo1-150x150.png)