EntityRepositoryInterface Error when applying Shopware 6 developer training plugin

I’m new to Shopware development, i applied all the steps from this course, and I got this error :https://academy.shopware.com/courses/take/shopware-6-developer-training-english # SwagShopFinder\Storefront\Subscriber\FooterSubscriber::__construct(): Argument #2 ($shopFinderRepository) must be of type Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface, Shopware\Core\Framework\DataAbstractionLayer\EntityRepository given, called in /var/www/html/var/cache/dev_h987edf903817e2a73423ee1b0a6408d4/ContainerPblYUYE/Shopware_Core_KernelDevDebugContainer.php on line 33975

The example plug-in is not up to date. Just write EntityRepository instead of EntityRepositoryInterface and then it works.

image

Thank you, i forgot to mention that i resolved it by writing EntityRepository instead of EntityRepositoryInterface, disabling then re-enabling the plugin and clearing the cache

1 „Gefällt mir“

It worked for me too, thank you