-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Deprecation Notice in RefreshTokenAuthenticator::start Method #389
Fix Deprecation Notice in RefreshTokenAuthenticator::start Method #389
Conversation
Explicitly marked parameter as nullable in the start method of the RefreshTokenAuthenticator class to comply with PHP 8.1+ standards.
@gzim324 here is the same issue, please check it as well |
- Update the type hint of the parameter in the start method from AuthenticationException to ?AuthenticationException. - Enhance code clarity and ensure consistency with nullable parameter type definition.
@@ -178,7 +178,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio | |||
return $this->failureHandler->onAuthenticationFailure($request, $exception); | |||
} | |||
|
|||
public function start(Request $request, AuthenticationException $authException = null): Response | |||
public function start(Request $request, ?AuthenticationException $authException = null): Response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Can somebody hit the merge button here? Thank you |
Fix Deprecation Notice in RefreshTokenAuthenticator::start Method
Summary
This pull request addresses a deprecation notice in the
GesdinetJWTRefreshTokenBundle
caused by thestart
method in theRefreshTokenAuthenticator
class. The$authException
parameter was implicitly nullable, which is deprecated in PHP 8.1+.Changes Made
start
method inRefreshTokenAuthenticator
to explicitly declare the$authException
parameter as nullable.Environment
Additional Context
This change ensures compatibility with PHP 8.1+ and eliminates the deprecation notice in development and test environments.