Any modification must be done in the main repository.
composer require codelytv/criteria-to-doctrine
public function matching(Criteria $criteria): array
{
$doctrineCriteria = (new CriteriaToDoctrineConverter())->convert($criteria);
return $this->repository(BackofficeCourse::class)->matching($doctrineCriteria)->toArray();
}