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

[5.8] Fix http kernel return docblock #26320

Closed
wants to merge 1 commit into from
Closed

[5.8] Fix http kernel return docblock #26320

wants to merge 1 commit into from

Conversation

seriquynh
Copy link
Contributor

The Illuminate\Foundation\Http\Kernel::handle() method has to return an Illuminate\Http\Response instance as which type it is hinted.

The Illuminate\Foundation\Http\Kernel::renderException() method also has to return the same type because it's called inside the handle block and it's result may be returned from handle on catching an exception.

@sisve
Copy link
Contributor

sisve commented Oct 31, 2018

This looks weird. The ExceptionHandler::render method is documented to return a Symfony response, so Kernel::renderException would also return a Symfony response. The Kernel contract states that the Kernel::handle should also return a Symfony response, it's just the Kernel implementation that returns a more specific one.

Perhaps it would make sense to change the Kernel's handle implementation's docblock to allow returning a Symfony response?

@GrahamCampbell
Copy link
Member

I think the current doc is fine. Also, I swear we keep getting PRs to change this back and forward @taylorotwell?

@taylorotwell
Copy link
Member

I'm done with these docblocks. Like 50% of all PR traffic is now docblocks.

@seriquynh seriquynh deleted the fix_http_kernel_return_docblock branch November 1, 2018 05:57
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

Successfully merging this pull request may close these issues.

4 participants