This question relates to
How to disable redirection after login_check in Symfony 2
I have implemented the solution given at that link exactly but am receiving an error I usually understand but on this occasion do not. My class absolutely implements the interface perfectly (I think).
Fatal error: Declaration of Foo\AppBundle\Handler\AuthenticationHandler::onAuthenticationSuccess() must be compatible with that of Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface::onAuthenticationSuccess() in /Users/Me/Sites/github/Foo/Symfony/src/Foo/AppBundle/Handler/AuthenticationHandler.php on line 6
class AuthenticationHandler implements
\Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface,
\Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface
{
function onAuthenticationSuccess(Request $request, TokenInterface $token) {
return new Response();
}
function onAuthenticationFailure(Request $request, AuthenticationException $exception) {
return new Response();
}
}
Advice appreciated!