mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-01 22:14:32 +02:00
Removed usage of partial flush which is not supported with the recent doctrine ORM version
This commit is contained in:
parent
fe732ecf45
commit
07c7f07c35
1 changed files with 4 additions and 7 deletions
|
@ -50,8 +50,7 @@ final class OAuthTokenManager
|
||||||
if ($tokenEntity) {
|
if ($tokenEntity) {
|
||||||
$tokenEntity->replaceWithNewToken($token);
|
$tokenEntity->replaceWithNewToken($token);
|
||||||
|
|
||||||
//@phpstan-ignore-next-line
|
$this->entityManager->flush();
|
||||||
$this->entityManager->flush($tokenEntity);
|
|
||||||
|
|
||||||
//We are done
|
//We are done
|
||||||
return $tokenEntity;
|
return $tokenEntity;
|
||||||
|
@ -60,8 +59,8 @@ final class OAuthTokenManager
|
||||||
//If the token was not existing, we create a new one
|
//If the token was not existing, we create a new one
|
||||||
$tokenEntity = OAuthToken::fromAccessToken($token, $app_name);
|
$tokenEntity = OAuthToken::fromAccessToken($token, $app_name);
|
||||||
$this->entityManager->persist($tokenEntity);
|
$this->entityManager->persist($tokenEntity);
|
||||||
//@phpstan-ignore-next-line
|
|
||||||
$this->entityManager->flush($tokenEntity);
|
$this->entityManager->flush();
|
||||||
|
|
||||||
return $tokenEntity;
|
return $tokenEntity;
|
||||||
}
|
}
|
||||||
|
@ -113,9 +112,7 @@ final class OAuthTokenManager
|
||||||
|
|
||||||
//Persist the token
|
//Persist the token
|
||||||
$token->replaceWithNewToken($new_token);
|
$token->replaceWithNewToken($new_token);
|
||||||
|
$this->entityManager->flush();
|
||||||
//@phpstan-ignore-next-line
|
|
||||||
$this->entityManager->flush($token);
|
|
||||||
|
|
||||||
return $token;
|
return $token;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue