Skip to content

Commit

Permalink
Merge 0ae5e54 into 33a8cbb
Browse files Browse the repository at this point in the history
  • Loading branch information
moufmouf committed Jan 24, 2020
2 parents 33a8cbb + 0ae5e54 commit 40b2a01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tests/Fixtures/Entities/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ public function getName(): string
* @Field()
* @Autowire(for="$testService")
* @Autowire(for="$someService", identifier="someService")
* @Autowire(for="$someService", identifier="someAlias")
* @return string
*/
public function injectService(TestGraphqlController $testService = null, stdClass $someService = null): string
public function injectService(TestGraphqlController $testService = null, stdClass $someService = null, stdClass $someAlias = null): string
{
if (!$testService instanceof TestGraphqlController || $someService === null) {
if (!$testService instanceof TestGraphqlController || $someService === null || $someAlias === null) {
return 'KO';
}
return 'OK';
Expand Down
3 changes: 3 additions & 0 deletions Tests/Fixtures/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ services:
someService:
class: stdClass

someAlias:
alias: someService

Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler:
class: Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler
# controllers are imported separately to make sure services can be injected
Expand Down

0 comments on commit 40b2a01

Please sign in to comment.