-
Notifications
You must be signed in to change notification settings - Fork 1
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
TASK: Avoid accessing "global" request, response and arguments in action controller #4
Conversation
62a1f36
to
cc15e4c
Compare
@@ -560,12 +560,12 @@ protected function callActionMethod(ActionRequest $request, ActionResponse $resp | |||
} | |||
|
|||
if ($actionResult === null && $this->view instanceof ViewInterface) { | |||
$this->response = $this->renderView($this->response); | |||
$response = $this->renderView($response); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this assignment on $this->response
was a thorn in my eyes
@@ -260,8 +260,7 @@ public function processRequest(ActionRequest $request): ActionResponse | |||
$this->initializeView($this->view); | |||
} | |||
|
|||
// We still use a global response here as it might have been changed in any of the steps above |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if someone dared to replace $this->response
above - not just mutate the object!!! - i dont know what i should think.
c956b23
to
44f5356
Compare
I extracted the standalone parts into own prs like neos#3292 so this might actually be merged directly into your feature branch, without to big of a diff. |
44f5356
to
03f7367
Compare
03f7367
to
d9b881d
Compare
for neos#3232