Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/AllRectorsOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5402,8 +5402,7 @@ Changes createForm(new FormType), add(new FormType) to ones with "FormType::clas
+ $form = $this->createForm(TeamType::class, $entity, [
'action' => $this->generateUrl('teams_update', ['id' => $entity->getId()]),
'method' => 'PUT',
- ]);
+ ));
]);
}
}
```
Expand Down Expand Up @@ -5595,7 +5594,7 @@ Change "read_only" option in form to attribute
function buildForm(FormBuilderInterface $builder, array $options)
{
- $builder->add('cuid', TextType::class, ['read_only' => true]);
+ $builder->add('cuid', TextType::class, ['attr' => [read_only' => true]]);
+ $builder->add('cuid', TextType::class, ['attr' => ['read_only' => true]]);
}
```

Expand Down Expand Up @@ -5698,7 +5697,7 @@ Turns string Form Type references to their CONSTANT alternatives in FormTypes in
```diff
$formBuilder = new Symfony\Component\Form\FormBuilder;
-$formBuilder->add('name', 'form.type.text');
+$form->add('name', \Symfony\Component\Form\Extension\Core\Type\TextType::class);
+$formBuilder->add('name', \Symfony\Component\Form\Extension\Core\Type\TextType::class);
```

<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getDefinition(): RectorDefinition
,
<<<'CODE_SAMPLE'
$formBuilder = new Symfony\Component\Form\FormBuilder;
$form->add('name', \Symfony\Component\Form\Extension\Core\Type\TextType::class);
$formBuilder->add('name', \Symfony\Component\Form\Extension\Core\Type\TextType::class);
CODE_SAMPLE
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function action()
$form = $this->createForm(TeamType::class, $entity, [
'action' => $this->generateUrl('teams_update', ['id' => $entity->getId()]),
'method' => 'PUT',
));
]);
}
}
CODE_SAMPLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function buildForm(FormBuilderInterface $builder, array $options)

function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('cuid', TextType::class, ['attr' => [read_only' => true]]);
$builder->add('cuid', TextType::class, ['attr' => ['read_only' => true]]);
}
CODE_SAMPLE
),
Expand Down