Skip to content
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

Update symfony4/knpu/ep4-security/login-form.md #13

Open
xidoc opened this issue Apr 17, 2019 · 1 comment
Open

Update symfony4/knpu/ep4-security/login-form.md #13

xidoc opened this issue Apr 17, 2019 · 1 comment

Comments

@xidoc
Copy link

xidoc commented Apr 17, 2019

Update the tutorial The Login Form for Return type declarations.

In fact, a Response declaration type is required.

use Symfony\Component\HttpFoundation\Response;
...
public function login(AuthenticationUtils $authenticationUtils): Response

How to Build a Login Form

@bocharsky-bw
Copy link
Member

Does it cause problems for you? I wonder what error do you see in your code if you don't have that Response return type specified?

In theory, we extend AbstractController that does not have login(), so login() is your personal method and should not require Response return type (though agree, the system requires so that a Reponse object to be returned, but that's a different case and you may totally miss it, i.e. do not specify Response as a return type).

Could you explain your problem a bit more and give us a more context, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants