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

feat(Dispatcher): Add debug log for controller methods returning raw data not wrapped in Response #49304

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

provokateurin
Copy link
Member

Summary

Returning plain data is allowed and some legacy code still does it.
Wrapping with Response or one of it's inheritors is preferred, as it gives better control over the entire response and also allows OpenAPI to work with it (openapi-extractor doesn't allow returning raw data for a good reason).

Checklist

…data not wrapped in Response

Signed-off-by: provokateurin <[email protected]>
@provokateurin provokateurin added the 3. to review Waiting for reviews label Nov 15, 2024
@provokateurin provokateurin added this to the Nextcloud 31 milestone Nov 15, 2024
@provokateurin provokateurin requested review from nickvergessen, kesselb, a team, icewind1991, artonge and skjnldsv and removed request for a team November 15, 2024 09:11
@nickvergessen
Copy link
Member

Which endpoints do it?

@provokateurin
Copy link
Member Author

Which endpoints do it?

For example

public function saveGlobalCredentials($uid, $user, $password) {

This was just the one that lead me to add this, I've definitely seen it a few times in other places as well (but I don't remember where).

@kesselb kesselb merged commit adc182c into master Nov 15, 2024
186 checks passed
@kesselb kesselb deleted the feat/dispatcher/log-raw-response-data branch November 15, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants