File tree 11 files changed +46
-43
lines changed
Fixture/TestBundle/Controller
11 files changed +46
-43
lines changed Original file line number Diff line number Diff line change 32
32
33
33
class AppKernel extends Kernel
34
34
{
35
- private $ config ;
35
+ private string | null $ config ;
36
36
37
- private $ fwConfig ;
37
+ private string $ fwConfig ;
38
38
39
39
public function __construct (string $ fwConfig , ?string $ config )
40
40
{
@@ -75,6 +75,8 @@ public function registerContainerConfiguration(LoaderInterface $loader)
75
75
if ($ this ->config ) {
76
76
$ loader ->load ($ this ->config );
77
77
}
78
+
79
+ $ loader ->load ($ this ->getProjectDir () . '/config/services.yaml ' );
78
80
}
79
81
80
82
public function getCacheDir (): string
Original file line number Diff line number Diff line change 4
4
5
5
namespace JMS \TranslationBundle \Tests \Functional \Fixture \TestBundle \Controller ;
6
6
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 ;
8
10
use Symfony \Component \Routing \Annotation \Route ;
9
11
10
12
/**
11
13
* @author Johannes
12
- *
13
- * @Route("/apples")
14
14
*/
15
- class AppleController
15
+ #[AsController()]
16
+ #[Route('/apples ' )]
17
+ class AppleController extends AbstractController
16
18
{
17
- /**
18
- * @Route("/view")
19
- * @Template("@Test/Apple/view.html.twig")
20
- */
21
- public function viewAction ()
19
+ #[Route('/view ' )]
20
+ public function viewAction (): Response
22
21
{
23
- return ['nbApples ' => 5 ];
22
+ return $ this -> render ( ' @Test/Apple/view.html.twig ' , ['nbApples ' => 5 ]) ;
24
23
}
25
24
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
31
27
{
32
- return ['nbApples ' => 5 ];
28
+ return $ this -> render ( ' @Test/Apple/view_sf5.html.twig ' , ['nbApples ' => 5 ]) ;
33
29
}
34
30
}
Original file line number Diff line number Diff line change @@ -6,10 +6,3 @@ imports:
6
6
framework :
7
7
templating :
8
8
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 1
1
imports :
2
2
- { resource: twig.yml }
3
3
- { 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:
13
13
translator :
14
14
enabled : true
15
15
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:
13
13
translator :
14
14
enabled : true
15
15
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
Original file line number Diff line number Diff line change 35
35
},
36
36
"require-dev" : {
37
37
"doctrine/annotations" : " ^1.11" ,
38
- "doctrine/coding-standard" : " ^8.2.1 " ,
38
+ "doctrine/coding-standard" : " ^9.0 " ,
39
39
"matthiasnoback/symfony-dependency-injection-test" : " ^4.1" ,
40
40
"nyholm/nsa" : " ^1.0.1" ,
41
41
"symfony/phpunit-bridge" : " ^5.4 || ^6.4" ,
You can’t perform that action at this time.
0 commit comments