Skip to content

Commit

Permalink
fix: association hydrator private in product repo
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Nek- committed Sep 1, 2021
1 parent 76ba101 commit dca7bfa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
class ProductRepository extends BaseProductRepository implements ProductRepositoryInterface
{
/** @var AssociationHydrator */
private $associationHydrator;
protected $associationHydrator;

public function __construct(EntityManager $entityManager, Mapping\ClassMetadata $class)
{
Expand Down

0 comments on commit dca7bfa

Please sign in to comment.