requireRole($this->security, 'ROLE_GESTIONNAIRE'); $constructeur = $this->constructeurs->find($constructeurId); if (!$constructeur) { $this->mcpError('not_found', "Constructeur not found: {$constructeurId}"); } $this->em->remove($constructeur); $this->em->flush(); return $this->jsonResponse(['deleted' => true, 'id' => $constructeurId]); } }