8000 minor #10925 MakerBundle v1.11.13 uses urlGenerator instead of Router… · symfony/symfony-docs@7a953d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a953d8

Browse files
committed
minor #10925 MakerBundle v1.11.13 uses urlGenerator instead of Router (romaricdrigon)
This PR was submitted for the 4.2 branch but it was merged into the 4.1 branch instead (closes #10925). Discussion ---------- MakerBundle v1.11.13 uses urlGenerator instead of Router Hello, Since version 1.11.3 and PR [#349](symfony/maker-bundle#349) MakerBundle uses `UrlGeneratorInterface` instead of `RouterInterface` when generating a new Guard for a login form, and the corresponding property changed. Hence the documentation code snippet is misleading. I'm not totally sure of which branch to PR on; being a change from latest version of MakerBundle, I think this is especially important for new projects, so using the latest Symfony version. Commits ------- f00344a MakerBundle uses urlGenerator instead of Router
2 parents ba53ff2 + f00344a commit 7a953d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/form_login_setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ be redirected after success:
295295
296296
- throw new \Exception('TODO: provide a valid redirect inside '.__FILE__);
297297
+ // redirect to some "app_homepage" route - of wherever you want
298-
+ return new RedirectResponse($this->router->generate('app_homepage'));
298+
+ return new RedirectResponse($this->urlGenerator->generate('app_homepage'));
299299
}
300300
301301
Unless you have any other TODOs in that file, that's it! If you're loading users

0 commit comments

Comments
 (0)
0