File tree Expand file tree Collapse file tree 11 files changed +46
-43
lines changed
Fixture/TestBundle/Controller Expand file tree Collapse file tree 11 files changed +46
-43
lines changed Original file line number Diff line number Diff line change 3232
3333class AppKernel extends Kernel
3434{
35- private $ config ;
35+ private string | null $ config ;
3636
37- private $ fwConfig ;
37+ private string $ fwConfig ;
3838
3939 public function __construct (string $ fwConfig , ?string $ config )
4040 {
@@ -75,6 +75,8 @@ public function registerContainerConfiguration(LoaderInterface $loader)
7575 if ($ this ->config ) {
7676 $ loader ->load ($ this ->config );
7777 }
78+
79+ $ loader ->load ($ this ->getProjectDir () . '/config/services.yaml ' );
7880 }
7981
8082 public function getCacheDir (): string
Original file line number Diff line number Diff line change 44
55namespace JMS \TranslationBundle \Tests \Functional \Fixture \TestBundle \Controller ;
66
7- use Sensio \Bundle \FrameworkExtraBundle \Configuration \Template ;
7+ use Symfony \Bundle \FrameworkBundle \Controller \AbstractController ;
8+ use Symfony \Component \HttpFoundation \Response ;
9+ use Symfony \Component \HttpKernel \Attribute \AsController ;
810use Symfony \Component \Routing \Annotation \Route ;
911
1012/**
1113 * @author Johannes
12- *
13- * @Route("/apples")
1414 */
15- class AppleController
15+ #[AsController()]
16+ #[Route('/apples ' )]
17+ class AppleController extends AbstractController
1618{
17- /**
18- * @Route("/view")
19- * @Template("@Test/Apple/view.html.twig")
20- */
21- public function viewAction ()
19+ #[Route('/view ' )]
20+ public function viewAction (): Response
2221 {
23- return ['nbApples ' => 5 ];
22+ return $ this -> render ( ' @Test/Apple/view.html.twig ' , ['nbApples ' => 5 ]) ;
2423 }
2524
26- /**
27- * @Route("/view_sf5")
28- * @Template("@Test/Apple/view_sf5.html.twig")
29- */
30- public function viewsf5Action ()
25+ #[Route('/view_sf5 ' )]
26+ public function viewsf5Action (): Response
3127 {
32- return ['nbApples ' => 5 ];
28+ return $ this -> render ( ' @Test/Apple/view_sf5.html.twig ' , ['nbApples ' => 5 ]) ;
3329 }
3430}
Original file line number Diff line number Diff line change @@ -6,10 +6,3 @@ imports:
66framework :
77 templating :
88 engines : [twig, php]
9-
10- parameters :
11- translation_output_dir : " %kernel.project_dir%/Fixture/TestBundle/Resources/translations"
12-
13- services :
14- logger :
15- class : Psr\Log\NullLogger
Original file line number Diff line number Diff line change 11imports :
22 - { resource: twig.yml }
33 - { resource: bundle.yml }
4-
5- parameters :
6- translation_output_dir : " %kernel.project_dir%/Fixture/TestBundle/Resources/translations"
7-
8- services :
9- logger :
10- class : Psr\Log\NullLogger
Original file line number Diff line number Diff line change @@ -13,4 +13,4 @@ framework:
1313 translator :
1414 enabled : true
1515 router :
16- resource : " %kernel.project_dir%/config/routing.yml "
16+ resource : " %kernel.project_dir%/config/routing.yaml "
Original file line number Diff line number Diff line change @@ -13,4 +13,4 @@ framework:
1313 translator :
1414 enabled : true
1515 router :
16- resource : " %kernel.project_dir%/config/routing.yml "
16+ resource : " %kernel.project_dir%/config/routing_sf6.yaml "
Original file line number Diff line number Diff line change 1+ JMSTranslationBundle_ui :
2+ resource : ' @JMSTranslationBundle/Controller/'
3+ type : ' annotation'
4+ prefix : /_trans
5+
6+ TestBundle :
7+ resource : ' @TestBundle/Controller/'
8+ type : ' annotation'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ JMSTranslationBundle_ui :
2+ resource : ' @JMSTranslationBundle/Controller/'
3+ type : ' attribute'
4+ prefix : /_trans
5+
6+ TestBundle :
7+ resource : ' @TestBundle/Controller/'
8+ type : ' attribute'
Original file line number Diff line number Diff line change 1+ parameters :
2+ translation_output_dir : ' %kernel.project_dir%/Fixture/TestBundle/Resources/translations'
3+
4+ services :
5+ logger :
6+ class : Psr\Log\NullLogger
7+
8+ JMS\TranslationBundle\Tests\Functional\Fixture\TestBundle\Controller\ :
9+ resource : ' @TestBundle/Controller/'
10+ autowire : true
11+ autoconfigure : true
You can’t perform that action at this time.
0 commit comments