Project

General

Profile

Actions

Bug #99476

closed

Add getRequest to RenderingContextInterface? (>= v11)

Added by Sybille Peters almost 2 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Code Cleanup
Target version:
-
Start date:
2023-01-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

RenderingContextInterface does not contain getRequest().

If extending from AbstractViewHelper and using renderStatic, the function looks like this:

public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
{

It should be possible to call $renderingContext->getRequest(), but then checks with phpstan will fail and you would have to check for the class name of the object (which should not really be necessary.

(Previously, it was possible to call $renderingContext->getControllerContext()->getRequest()).


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #99475: Imcomplete deprecation (without trigger etc.) of RenderingContext::getControllerContext and ControllerContext functions (v11)Closed2023-01-06

Actions
Actions

Also available in: Atom PDF