The error message you got provides relevant clues about what's going wrong.
getQuestions()
is called on a non object.
Make sure $project
is an instance of ***Bundle:Projet
and that
$repository->find($projetid);
is returning a valid object.
Probably that the given $projetid
doesn't match any record in your date source.