Skip to content

[Routing] add missing actions return hints #17168

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

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ do so, create a :doc:`controller class </controller>` like the following:
/**
* @Route("/blog", name="blog_list")
*/
public function list()
public function list(): Response
{
// ...
}
Expand All @@ -97,7 +97,7 @@ do so, create a :doc:`controller class </controller>` like the following:
class BlogController extends AbstractController
{
#[Route('/blog', name: 'blog_list')]
public function list()
public function list(): Response
{
// ...
}
Expand Down Expand Up @@ -1045,7 +1045,7 @@ optional ``priority`` parameter in those routes to control their priority:
*
* @Route("/blog/{slug}", name="blog_show")
*/
public function show(string $slug)
public function show(string $slug): Response
{
// ...
}
Expand All @@ -1055,7 +1055,7 @@ optional ``priority`` parameter in those routes to control their priority:
*
* @Route("/blog/list", name="blog_list", priority=2)
*/
public function list()
public function list(): Response
{
// ...
}
Expand All @@ -1075,7 +1075,7 @@ optional ``priority`` parameter in those routes to control their priority:
* This route has a greedy pattern and is defined first.
*/
#[Route('/blog/{slug}', name: 'blog_show')]
public function show(string $slug)
public function show(string $slug): Response
{
// ...
}
Expand All @@ -1084,7 +1084,7 @@ optional ``priority`` parameter in those routes to control their priority:
* This route could not be matched without defining a higher priority than 0.
*/
#[Route('/blog/list', name: 'blog_list', priority: 2)]
public function list()
public function list(): Response
{
// ...
}
Expand Down Expand Up @@ -2493,7 +2493,7 @@ session shouldn't be used when matching a request:
/**
* @Route("/", name="homepage", stateless=true)
*/
public function homepage()
public function homepage(): Response
{
// ...
}
Expand All @@ -2510,7 +2510,7 @@ session shouldn't be used when matching a request:
class MainController extends AbstractController
{
#[Route('/', name: 'homepage', stateless: true)]
public function homepage()
public function homepage(): Response
{
// ...
}
Expand Down