Commit 8f66dbb
committed
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 ?1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
343 | 345 | | |
344 | 346 | | |
345 | 347 | | |
| |||
386 | 388 | | |
387 | 389 | | |
388 | 390 | | |
389 | | - | |
| 391 | + | |
390 | 392 | | |
391 | 393 | | |
392 | 394 | | |
393 | | - | |
| 395 | + | |
394 | 396 | | |
395 | 397 | | |
396 | | - | |
| 398 | + | |
397 | 399 | | |
398 | 400 | | |
399 | | - | |
| 401 | + | |
400 | 402 | | |
401 | 403 | | |
402 | 404 | | |
| |||
0 commit comments