8000 Fix documentation for a controllers with __invoke function in php routing by Ferror · Pull Request #13538 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Fix documentation for a controllers with __invoke function in php routing #13538

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
Apr 14, 2020
Merged

Conversation

Ferror
Copy link
Contributor
@Ferror Ferror commented Apr 12, 2020

Hi, the current docs tell that proper using controller with __invoke class should be implemented by:

// if the action is implemented as the __invoke() method of the
// controller class, you can skip the ', method_name]' part:
// ->controller([BlogController::class])

which is wrong. The implementation should be without [] brackets:

// ->controller(BlogController::class)

…ting

Hi there current docs tell that proper using controller with ```__invoke``` class should be implemented by:
```
// if the action is implemented as the __invoke() method of the
// controller class, you can skip the ', method_name]' part:
// ->controller([BlogController::class])
```

which is wrong. The doc should be without [] brackets:
```
// ->controller(BlogController::class)
```
@javiereguiluz javiereguiluz changed the base branch from master to 4.4 April 14, 2020 08:08
@javiereguiluz
Copy link
Member

Good catch, thanks @Ferror.

@javiereguiluz javiereguiluz merged commit 1d30a61 into symfony:4.4 Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0