Find the best Rector rule to solve your problem
Change $context->addViolationAt
to $context->buildViolation
on Validator ExecutionContext
-$context->addViolationAt('property', 'The value {{ value }} is invalid.', array(
- '{{ value }}' => $invalidValue,
-));
+$context->buildViolation('The value {{ value }} is invalid.')
+ ->atPath('property')
+ ->setParameter('{{ value }}', $invalidValue)
+ ->addViolation();
Change form option "max_length" to a form "attr" > "max_length"
$formBuilder = new Symfony\Component\Form\FormBuilder();
$form = $formBuilder->create('name', 'text', [
- 'max_length' => 123,
+ 'attr' => ['maxlength' => 123],
]);