Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #36806 RememberMeLogoutListener should depend on LogoutHandlerInt…
…erface (scheb) This PR was merged into the 5.1-dev branch. Discussion ---------- RememberMeLogoutListener should depend on LogoutHandlerInterface | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT `RememberMeLogoutListener`, which was introduced together with the new authenticator security in Symfony 5.1, depends on `AbstractRememberMeServices`. This forces people to always extend from `AbstractRememberMeServices`, even when they're implementing the correct interface. I'd suggest to depend on the minimum interface, which is `LogoutHandlerInterface`, instead. Example of the type errors you'd get otherwise: ` Argument 1 passed to Symfony\Component\Security\Http\EventListener\RememberMeLogoutListener::__construct() must be an instance of Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices, instance of Scheb\TwoFactorBundle\Security\Authentication\RememberMe\RememberMeServicesDecorator given, called in var/cache/dev/Container3IpOCEd/getSecurity_Logout_Listener_RememberMe_MainService.php on line 22 ` with ```php class RememberMeServicesDecorator implements RememberMeServicesInterface, LogoutHandlerInterface [...] ``` Commits ------- 994700f Depend on LogoutHandlerInterface
- Loading branch information