Skip to content

Commit 2420914

Browse files
committed
📦 Migrate to attributes - since support for Doctrine annotations dropped
1 parent f64cea8 commit 2420914

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/Controller/GraphQL/LoginController.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ public function __construct(UserProviderInterface $userProvider, UserPasswordHas
5454
$this->eventDispatcher = $eventDispatcher;
5555
}
5656

57-
/**
58-
* @Mutation()
59-
*
60-
* @phpstan-return UserInterface
61-
*/
57+
#[Mutation]
6258
public function login(string $userName, string $password, Request $request): UserInterface
6359
{
6460
try {
@@ -95,9 +91,7 @@ public function login(string $userName, string $password, Request $request): Use
9591
return $user;
9692
}
9793

98-
/**
99-
* @Mutation()
100-
*/
94+
#[Mutation]
10195
public function logout(Request $request): bool
10296
{
10397
$this->tokenStorage->setToken(null);

src/Controller/GraphQL/MeController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ public function __construct(TokenStorageInterface $tokenStorage)
1818
$this->tokenStorage = $tokenStorage;
1919
}
2020

21-
/**
22-
* @Query()
23-
*/
21+
#[Query]
2422
public function me(): ?UserInterface
2523
{
2624
$token = $this->tokenStorage->getToken();

0 commit comments

Comments
 (0)