-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
I have a custom Authentication process in my project and I am extending the SimpleForm stuff to achieve my desired logic. Everything is working fine but I am getting a deprecation notice and I want to get rid of it:
The MyAuthenticator class implements Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface that is deprecated Deprecated since version 2.8, to be removed in 3.0. Use the same interface from Security\Http\Authentication instead.
I am using the correct Interface from Http. However I am still seeing this error.
I was just able to fix this problem locally by doing the following:
The first problem is Symfony\Component\Security\Http\Authentication\SimpleFormAuthenticatorInterface
In 2.8 it simply extends the deprecated interface from the Core namespace. I simply copy pasted the code from the Core interface (so it won't extend a depreacted class. this is what happened in 3.0 btw)
After doing this I got the following:
Catchable Fatal Error: Argument 12 (!!!) passed to Symfony\Component\Security\Http\Firewall\SimpleFormAuthenticationListener::__construct() must be an instance of Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface
This is another class I am overriding with some custom logic and when changing the namespace from Core to Http in there everything was working and the deprecation notice was gone.
How can I extend the SimpleForm* stuff without local hacks and without getting annoyed by the deprecation notice? Is this simply an open todo (to be fixed in 2.8.1?)