File tree Expand file tree Collapse file tree 7 files changed +31
-36
lines changed
Fixture/TestBundle/Controller Expand file tree Collapse file tree 7 files changed +31
-36
lines changed Original file line number Diff line number Diff line change @@ -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 11JMSTranslationBundle_ui :
2- resource : " @JMSTranslationBundle/Controller/"
3- type : annotation
4- prefix : /_trans
2+ resource : ' @JMSTranslationBundle/Controller/'
3+ type : ' annotation'
4+ prefix : /_trans
55
66TestBundle :
7- type : annotation
8- resource : " @TestBundle/Controller/ "
7+ resource : ' @TestBundle/Controller/ '
8+ type : ' annotation '
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
Original file line number Diff line number Diff line change 3535 },
3636 "require-dev" : {
3737 "doctrine/annotations" : " ^1.11" ,
38- "doctrine/coding-standard" : " ^8.2.1 " ,
38+ "doctrine/coding-standard" : " ^9.0 " ,
3939 "matthiasnoback/symfony-dependency-injection-test" : " ^4.1" ,
4040 "nyholm/nsa" : " ^1.0.1" ,
4141 "symfony/phpunit-bridge" : " ^5.4 || ^6.4" ,
You can’t perform that action at this time.
0 commit comments