Issue Bug Rejected

#99476Add getRequest to RenderingContextInterface? (>= v11)

Sybille Peters 01/06/23, 09:55 updated 01/06/23, 10:48

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()).

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.