Skip to content

Commit c555392

Browse files
committed
minor #18078 Update upload_file.rst (hbgamra)
This PR was submitted for the 6.2 branch but it was merged into the 5.4 branch instead. Discussion ---------- Update upload_file.rst Add response return type <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- 3026bea Update upload_file.rst
2 parents fc8a4ed + 3026bea commit c555392

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)