From 26d6adf9f9b056f7a8421e4c9b3a32b2b22e06f6 Mon Sep 17 00:00:00 2001 From: Maxime Veber Date: Wed, 1 Sep 2021 17:58:14 +0200 Subject: [PATCH] fix: association hydrator private in product repo This class is designed to be extended. Therefore having a private field not overridable seems to be a bad idea. Another idea could be to take it as a constructor parameter but it just makes no sense since it would just suggest to the user add its own private property to make the whole thing work. This commit is to me the best approach to the problem. --- src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php index 202895235b0..61d874b7e80 100644 --- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php +++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php @@ -25,7 +25,7 @@ class ProductRepository extends BaseProductRepository implements ProductRepositoryInterface { - private AssociationHydrator $associationHydrator; + protected AssociationHydrator $associationHydrator; public function __construct(EntityManager $entityManager, ClassMetadata $class) {