Skip to main content
2 of 2
added 2 characters in body

If anyone meets this bug, you should check if you declare an inherence from the interface to the implemented class in di.xml with preference tag. Then run bin/magento setup:upgrade to remove var/generation and cache. For production, you also need to run:

bin/magento setup:static-content:deploy
bin/magento setup:di:compile