Skip to content

update controller return value #20411

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
Nov 26, 2024

Conversation

Florian-Merle
Copy link
Contributor

A controller is not required to return a Response object anymore.

@carsonbot carsonbot added this to the 5.4 milestone Nov 26, 2024
@Florian-Merle Florian-Merle changed the title update controller return value doc update controller return value Nov 26, 2024
@javiereguiluz javiereguiluz merged commit 6b75287 into symfony:5.4 Nov 26, 2024
3 checks passed
@javiereguiluz
Copy link
Member

Thanks Florian for this contribution! However, while merging we did some rewording (see d019fc4).

It's not that your contribution was wrong, but the Controllers chapter in the docs is special. It's one of those that newcomers read first. So, we must be extra careful with anything we mention in them.

The original contribution could introduce some confusion in newcomers because it mentions events and listeners when they haven't been introduced yet.

So, in the reword, we still mention events but as an advanced feature that they'll learn about later. We think this provides a better balance between being technically correct and keep this chapter very approachable for newcomers.

Cheers!

@Florian-Merle Florian-Merle deleted the fix/controller-config branch November 26, 2024 17:22
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.

4 participants