Skip to content

Commit d0a8b36

Browse files
authored
Persisting : forget a "use" statement ?
The `ProductController` created above (L332) by `$ php bin/console make:controller ProductController` use this generated code : ```php return $this->render('product/index.html.twig', [ 'controller_name' => 'ProductController', ]); ``` But we modify this to returns a `new Response('...')`, so we must add a `use Symfony\Component\HttpFoundation\Response;` statement to work. Not sure if it's better to force good habits of "search and debug", or just having a "cut n' paste" working example (-:
1 parent 7d89756 commit d0a8b36

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doctrine.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ and save it!
340340
namespace App\Controller;
341341
342342
// ...
343+
use Symfony\Component\HttpFoundation\Response;
344+
343345
use App\Entity\Product;
344346
345347
class ProductController extends AbstractController

0 commit comments

Comments
 (0)