Issue Bug Closed

#99475Imcomplete deprecation (without trigger etc.) of RenderingContext::getControllerContext and ControllerContext functions (v11)

Sybille Peters 01/06/23, 09:34 updated 01/06/23, 12:48

Description

No PHPDoc explanation, no triggering of deprecation notice for deprecation of RenderingContext::getControllerContext (v11)

1. no deprecation notice is triggered in
  • ControllerContext::getUriBuilder
  • ControllerContext::getFlashMessageQueue
  • RenderingContext::getControllerContext

Usually it is customary to trigger a E_USER_DEPRECATED if a deprecated function is used:

trigger_error('...', E_USER_DEPRECATED);

2. no explanation in PHPDoc
3. changelog a bit difficult to find, if you search for getControllerContext, you get no result, it might help to add the deprecated functions to the alread existing changelog

grep -r getControllerContext htdocs/typo3/sysext/core/Documentation/
htdocs/typo3/sysext/core/Documentation/Changelog/9.0/Breaking-82414-RemoveCMSBaseViewHelperClasses.rst::php:`$this->renderingContext->getControllerContext()`.
htdocs/typo3/sysext/core/Documentation/Changelog/8.5/Feature-78842-LetFluidtemplateMimicAnActualExtbaseWebRequest.rst:        ->getControllerContext()
/**
     * Get the controller context which will be passed to the ViewHelper
     *
     * @return ControllerContext The controller context to set
     * @deprecated since v11, will be removed in v12
     */
    public function getControllerContext()

Related patches, issues, changelogs

in 9.x it was still recommended to use this function, see https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/9.0/Breaking-82414-RemoveCMSBaseViewHelperClasses.html#migration

Reviews 0

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