Repository Classes uses old ParentClass
i use this bundle for Tree-Entitys. but when i want to extend from NestedTreeRepository.php, i see that this Class extends AbstractTreeRepository and the Abstract Class from the old "EntityRepository"
Thanks for your feedback And what's the point? "Doctrine\ORM\EntityRepository" isn't deprecated
The newer doctrine repository classes look like:
class ObjectTypeRepository extends ServiceEntityRepository
now you can no longer simply replace the extends with NestedTreeRepository:
class ObjectTypeRepository extends NestedListItemRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, ObjectType::class);
}
}..
Because the parent constructor doesn't take a ManagerRegistry.
A simple hack is to remove the constructor, but then you can't inject the repository in a service, because it expects a proper constructor. So the solution there is to inject the EntityManager and get the repo, but obviously the real solution is to fix the constructor call.
Any chance this can fixed? It's problematic to not be able have a constructor, because (1) sometimes you need to inject other services and (2) it'd be really convenient to inject the repository into other classes.
I spent a couple of hours trying to figure this out, but it was beyond my skill level. But using this class is awesome, it's terrific for storing and retrieving tree data.
Thanks.