@@ -356,7 +356,7 @@ and save it::
356
356
use App\Entity\Product;
357
357
use Doctrine\ORM\EntityManagerInterface;
358
358
use Symfony\Component\HttpFoundation\Response;
359
- use Symfony\Component\Routing\Annotation \Route;
359
+ use Symfony\Component\Routing\Attribute \Route;
360
360
361
361
class ProductController extends AbstractController
362
362
{
@@ -438,7 +438,7 @@ Consider the following controller code::
438
438
439
439
use App\Entity\Product;
440
440
use Symfony\Component\HttpFoundation\Response;
441
- use Symfony\Component\Routing\Annotation \Route;
441
+ use Symfony\Component\Routing\Attribute \Route;
442
442
use Symfony\Component\Validator\Validator\ValidatorInterface;
443
443
// ...
444
444
@@ -502,7 +502,7 @@ be able to go to ``/product/1`` to see your new product::
502
502
use App\Entity\Product;
503
503
use Doctrine\ORM\EntityManagerInterface;
504
504
use Symfony\Component\HttpFoundation\Response;
505
- use Symfony\Component\Routing\Annotation \Route;
505
+ use Symfony\Component\Routing\Attribute \Route;
506
506
// ...
507
507
508
508
class ProductController extends AbstractController
@@ -535,7 +535,7 @@ and injected by the dependency injection container::
535
535
use App\Entity\Product;
536
536
use App\Repository\ProductRepository;
537
537
use Symfony\Component\HttpFoundation\Response;
538
- use Symfony\Component\Routing\Annotation \Route;
538
+ use Symfony\Component\Routing\Attribute \Route;
539
539
// ...
540
540
541
541
class ProductController extends AbstractController
@@ -624,7 +624,7 @@ automatically! You can simplify the controller to::
624
624
use App\Entity\Product;
625
625
use App\Repository\ProductRepository;
626
626
use Symfony\Component\HttpFoundation\Response;
627
- use Symfony\Component\Routing\Annotation \Route;
627
+ use Symfony\Component\Routing\Attribute \Route;
628
628
// ...
629
629
630
630
class ProductController extends AbstractController
@@ -700,7 +700,7 @@ the ``EntityValueResolver`` behavior by using the `MapEntity options`_ ::
700
700
use App\Entity\Product;
701
701
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
702
702
use Symfony\Component\HttpFoundation\Response;
703
- use Symfony\Component\Routing\Annotation \Route;
703
+ use Symfony\Component\Routing\Attribute \Route;
704
704
// ...
705
705
706
706
class ProductController extends AbstractController
@@ -841,7 +841,7 @@ with any PHP model::
841
841
use App\Repository\ProductRepository;
842
842
use Doctrine\ORM\EntityManagerInterface;
843
843
use Symfony\Component\HttpFoundation\Response;
844
- use Symfony\Component\Routing\Annotation \Route;
844
+ use Symfony\Component\Routing\Attribute \Route;
845
845
// ...
846
846
847
847
class ProductController extends AbstractController
0 commit comments