Skip to content

Commit 4cf29bc

Browse files
committed
Merge branch '5.4' into 6.2
* 5.4: Task object instead of id as param
2 parents 561b404 + 14ee636 commit 4cf29bc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

form/form_collections.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -643,12 +643,8 @@ the relationship between the removed ``Tag`` and ``Task`` object.
643643

644644
class TaskController extends AbstractController
645645
{
646-
public function edit($id, Request $request, EntityManagerInterface $entityManager): Response
646+
public function edit(Task $task, Request $request, EntityManagerInterface $entityManager): Response
647647
{
648-
if (null === $task = $entityManager->getRepository(Task::class)->find($id)) {
649-
throw $this->createNotFoundException('No task found for id '.$id);
650-
}
651-
652648
$originalTags = new ArrayCollection();
653649

654650
// Create an ArrayCollection of the current Tag objects in the database

0 commit comments

Comments
 (0)