You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #11062 Persisting : forget a "use" statement ? (Rom1deTroyes)
This PR was squashed before being merged into the 4.2 branch (closes#11062).
Discussion
----------
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('...')` :
```php
return new Response('Saved new product with id '.$product->getId());
```
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 ? (-:
Commits
-------
d1e794f Persisting : forget a \"use\" statement ?
0 commit comments