Skip to content

Commit 3026bea

Browse files
hbgamrajaviereguiluz
authored andcommitted
Update upload_file.rst
Add response return type
1 parent fc8a4ed commit 3026bea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

controller/upload_file.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ Finally, you need to update the code of the controller that handles the form::
128128
use Symfony\Component\HttpFoundation\File\Exception\FileException;
129129
use Symfony\Component\HttpFoundation\File\UploadedFile;
130130
use Symfony\Component\HttpFoundation\Request;
131+
use Symfony\Component\HttpFoundation\Response;
131132
use Symfony\Component\Routing\Annotation\Route;
132133
use Symfony\Component\String\Slugger\SluggerInterface;
133134

@@ -136,7 +137,7 @@ Finally, you need to update the code of the controller that handles the form::
136137
/**
137138
* @Route("/product/new", name="app_product_new")
138139
*/
139-
public function new(Request $request, SluggerInterface $slugger)
140+
public function new(Request $request, SluggerInterface $slugger): Response
140141
{
141142
$product = new Product();
142143
$form = $this->createForm(ProductType::class, $product);

0 commit comments

Comments
 (0)