File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,12 @@ public function getName(): string
3737 * @Field()
3838 * @Autowire(for="$testService")
3939 * @Autowire(for="$someService", identifier="someService")
40+ * @Autowire(for="$someService", identifier="someAlias")
4041 * @return string
4142 */
42- public function injectService (TestGraphqlController $ testService = null , stdClass $ someService = null ): string
43+ public function injectService (TestGraphqlController $ testService = null , stdClass $ someService = null , stdClass $ someAlias = null ): string
4344 {
44- if (!$ testService instanceof TestGraphqlController || $ someService === null ) {
45+ if (!$ testService instanceof TestGraphqlController || $ someService === null || $ someAlias === null ) {
4546 return 'KO ' ;
4647 }
4748 return 'OK ' ;
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ services:
2020 someService :
2121 class : stdClass
2222
23+ someAlias :
24+ alias : someService
25+
2326 Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler :
2427 class : Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler
2528 # controllers are imported separately to make sure services can be injected
You can’t perform that action at this time.
0 commit comments