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

!!! FEATURE: WIP Dispatcher and controller return ActionResponse (simpler controller pattern) #3232

Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d94562f
!!!FEATURE: Clearer controller pattern
kitsunet Nov 11, 2023
8ee71e9
Controller cleanup
kitsunet Dec 26, 2023
0fcf522
Style and suggestions cleanup
kitsunet Dec 26, 2023
e3fb34b
Tests for SimpleActionController
kitsunet Dec 26, 2023
b12f1df
Fix AjaxWidget dispatching to use new StopActionException::response
kitsunet Dec 27, 2023
3360130
Correct style issues
kitsunet Dec 27, 2023
0689c78
Fix spelling error
kitsunet Dec 28, 2023
465c80b
Merge remote-tracking branch 'origin/9.0' into feature/actioncontroll…
mhsdesign Jan 25, 2024
88f43d5
TASK: Adjust typos and doc of `ControllerInterface`
mhsdesign Jan 25, 2024
03662a7
TASK: Fix `RestController::redirectToUri`
mhsdesign Jan 25, 2024
3df0dbd
Update Neos.Flow/Tests/Functional/Http/Fixtures/Controller/FooControl…
kitsunet Jan 26, 2024
57d8995
TASK: Update `ControllerInterface::processRequest` doc
mhsdesign Jan 25, 2024
f3ba560
TASK: Fix `FooController` test
mhsdesign Jan 26, 2024
e3cdfb4
!!! TASK: Separate `ForwardException` from `StopActionException`
mhsdesign Jan 25, 2024
d507942
!!! TASK: Adjust Signals Dispatcher `beforeControllerInvocation` and …
mhsdesign Jan 26, 2024
c1ce1bc
TASK: Set fix $code of `StopActionException`
mhsdesign Jan 26, 2024
18da350
TASK: Adjust docs of MVC Control flow exceptions
mhsdesign Jan 26, 2024
73d7214
TASK: Rename factory methods of MVC Control flow exceptions
mhsdesign Jan 26, 2024
a59bdaa
Merge pull request #3 from mhsdesign/test-can-i-push-to-christian-que…
kitsunet Jan 26, 2024
554aa08
SpecialResponses become final
kitsunet Jan 27, 2024
82caa27
TASK: Revert introduction of `SimpleActionController`
mhsdesign Feb 3, 2024
c96fd84
TASK: Revert introduction of `SpecialResponsesSupport`
mhsdesign Feb 3, 2024
e540eb3
TASK: Fix phpstan
mhsdesign Feb 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
SpecialResponses become final
kitsunet committed Jan 27, 2024
commit 554aa081f60e27c49bcc134935c4288473e5eb5d
10 changes: 5 additions & 5 deletions Neos.Flow/Classes/Mvc/Controller/SpecialResponsesSupport.php
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ trait SpecialResponsesSupport
* @return never
* @throws StopActionException
*/
protected function responseThrowsStatus(int $statusCode, string $content = '', ?ActionResponse $response = null): never
final protected function responseThrowsStatus(int $statusCode, string $content = '', ?ActionResponse $response = null): never
{
$response = $response ?? new ActionResponse;

@@ -43,7 +43,7 @@ protected function responseThrowsStatus(int $statusCode, string $content = '', ?
* @return ActionResponse
* @throws StopActionException
*/
protected function responseRedirectsToUri(UriInterface $uri, int $delay = 0, int $statusCode = 303, ?ActionResponse $response = null): ActionResponse
final protected function responseRedirectsToUri(UriInterface $uri, int $delay = 0, int $statusCode = 303, ?ActionResponse $response = null): ActionResponse
{
$nextResponse = $response !== null ? clone $response : new ActionResponse();

@@ -53,7 +53,7 @@ protected function responseRedirectsToUri(UriInterface $uri, int $delay = 0, int
}

$nextResponse->setStatusCode($statusCode);
$content = sprintf('<html><head><meta http-equiv="refresh" content="%u;url=%s"/></head></html>', $delay, $uri);
$content = sprintf('<html lang="en"><head><meta http-equiv="refresh" content="%u;url=%s"/><title>Redirect to %s</title></head></html>', $delay, $uri, $uri);
$nextResponse->setContent($content);
return $nextResponse;
}
@@ -64,7 +64,7 @@ protected function responseRedirectsToUri(UriInterface $uri, int $delay = 0, int
* @return never
* @throws StopActionException
*/
protected function throwStopActionWithResponse(ActionResponse $response, string $details = ''): never
final protected function throwStopActionWithResponse(ActionResponse $response, string $details = ''): never
{
throw StopActionException::createForResponse($response, $details);
}
@@ -80,7 +80,7 @@ protected function throwStopActionWithResponse(ActionResponse $response, string
* @return never
* @throws ForwardException
*/
protected function forwardToRequest(ActionRequest $request): never
final protected function forwardToRequest(ActionRequest $request): never
{
$nextRequest = clone $request;
throw ForwardException::createForNextRequest($nextRequest, '');