В итоге эти решения сработали.
$builder->add('users', EntityType::class, [
'class' => User::class,
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('u')
->where('u.id = :user_id')
->setParameter('user_id', $this->security->getUser()->getId());
}
]);
Или в контроллере напрямую
/**
* @Route("/classified/new", name="classified_create")
* @IsGranted("ROLE_USER")
* @param Request $request
* @param ObjectManager $manager
* @param CreateVehicleFlow $createVehicleFlow
* @return Response
*/
public function create(Request $request, ObjectManager $manager, CreateVehicleFlow $createVehicleFlow)
{
$user = $this->getUser();
$vehicle = new CarVehicle();
$vehicle->setCity($user->getCity());
...