Sep 1, 2018 · 1 min read
Hello!
In my opinion, it’s enought to Doctrine Product Repository just implement ProductRepository interface:
class ProductRepository extends EntityRepository implements ProductRepositoryInterface
That means that you can get rid of DoctrineProductRepository adapter class as it’s redundant. Moreover, you can accept ProductRepositoryInterface as a dependency which means that any class wouldn’t stick to DoctrineProductRepository class. For example, what if you going to change Doctrine to Proper? That would lead to changing every class that depends on DoctrineProductRepository