// EntityRepository
$builder = $this->createQueryBuilder('st');
$builder
->update()
->set('st.someField', ':value')
->where($builder->expr()->in('st.id', ':ids'))
->setParameter('value', 1)
->setParameter('ids', $ids)
;
// Entity
/**
* @ORM\Column(type="string", name="some_another_field")
*/
private string $someField;
\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
if (!$this->authorizationChecker->isGranted(Attributes::DELETE, $post)) {
$this->logger->warning(sprintf('Can\'t delete post "%s"', $post->getId()));
return;
}