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- authored and jakubtobiasz committed Feb 7, 2023
1 parent 48b1cdd commit 26d6adf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

class ProductRepository extends BaseProductRepository implements ProductRepositoryInterface
{
private AssociationHydrator $associationHydrator;
protected AssociationHydrator $associationHydrator;

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

0 comments on commit 26d6adf

Please sign in to comment.