We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
At the moment all method that map to HTTP verbs return something like the following:
/** * Create a new resource * * @param mixed $data * @return mixed */ public function create($data) { $this->response->setStatusCode(405); return [ 'content' => 'Method Not Allowed' ]; }
We suggest that the response object should be returned here, instead of an array, like so:
/** * Create a new resource * * @param mixed $data * @return mixed */ public function create($data) { $this->response->setStatusCode(405); $this->response->setContent('Method Not Allowed'); return $this->response }
In this way a not implemented method in a controller can simply be left out and Laminas does the right thing automatically.
At the moment you have to overwrite the method no matter what.
The text was updated successfully, but these errors were encountered:
In theory, if mixed is allowed as response, it should not be a BC break.
mixed
What happens right now if you return a Response instance?
Response
Sorry, something went wrong.
Also: could you write a test for current behavior?
No branches or pull requests
Feature Request
At the moment all method that map to HTTP verbs return something like the following:
We suggest that the response object should be returned here, instead of an array, like so:
Summary
In this way a not implemented method in a controller can simply be left out and Laminas does the right thing automatically.
At the moment you have to overwrite the method no matter what.
The text was updated successfully, but these errors were encountered: