-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace TYPO3\CMS\Core\Http; | ||
|
||
use Psr\Http\Message\ResponseInterface; | ||
|
||
if(class_exists('TYPO3\CMS\Core\Http\PropagateResponseException')) { | ||
return; | ||
} | ||
|
||
final class PropagateResponseException extends ImmediateResponseException | ||
{ | ||
public function __construct(ResponseInterface $response, int $code) | ||
{ | ||
parent::__construct(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...rActionsMustReturnResponseInterfaceRector/Fixture/skip_extbase_controller_actions.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Ssch\TYPO3Rector\Tests\Rector\v11\v0\ExtbaseControllerActionsMustReturnResponseInterfaceRector\Fixture; | ||
|
||
use Psr\Http\Message\ResponseInterface; | ||
use TYPO3\CMS\Core\Http\PropagateResponseException; | ||
use TYPO3\CMS\Extbase\Http\ForwardResponse; | ||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; | ||
|
||
class MyRefactoredController extends ActionController | ||
{ | ||
public function someAction(): ResponseInterface | ||
{ | ||
$response = $this->responseFactory->createResponse(200); | ||
throw new PropagateResponseException($response, 200); | ||
} | ||
|
||
public function someOtherAction(): ResponseInterface | ||
{ | ||
return new ForwardResponse('another'); | ||
} | ||
} | ||
|
||
?> | ||
|