Skip to content

Commit

Permalink
Fix csrf token symfony 4 php 7.2 compatibility (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz authored Jun 25, 2021
1 parent 9c3c0ab commit 3b1c55d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Csrf/DisabledCsrfTokenManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ public function __construct(CsrfTokenManagerInterface $csrfTokenManager)
$this->csrfTokenManager = $csrfTokenManager;
}

public function refreshToken(string $tokenId)
/**
* @param string $tokenId
*/
public function refreshToken($tokenId)
{
return $this->csrfTokenManager->refreshToken($tokenId);
}

public function removeToken(string $tokenId)
/**
* @param string $tokenId
*/
public function removeToken($tokenId)
{
return $this->csrfTokenManager->removeToken($tokenId);
}
Expand All @@ -41,7 +47,10 @@ public function isTokenValid(CsrfToken $token)
return $this->csrfTokenManager->isTokenValid($token);
}

public function getToken(string $tokenId)
/**
* @param string $tokenId
*/
public function getToken($tokenId)
{
return new CsrfToken('', null);
}
Expand Down

0 comments on commit 3b1c55d

Please sign in to comment.