Project

General

Profile

Actions

Bug #99475

closed

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

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

Status:
Closed
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

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #99476: Add getRequest to RenderingContextInterface? (>= v11)Rejected2023-01-06

Actions
Actions #1

Updated by Sybille Peters almost 2 years ago

  • Related to Bug #99476: Add getRequest to RenderingContextInterface? (>= v11) added
Actions #2

Updated by Christian Kuhn almost 2 years ago

  • Status changed from New to Needs Feedback

I'm unsure if we should still add trigger_error()'s to this in v11: One reason to get rid of ControllerContext was that it has been wired into RenderingContext and initialized always. This would have made RenderingContext always log deprecation messages, so we couldn't log deprecations in RenderingContext::getControllerContext. I'm not totally sure about ControllerContext::getUriBuilder and ControllerContext::getFlashMessageQueue anymore, but I assume similar difficulties. The class is annotated @deprecated in v11 and the extension scanner finds things, I hope that's enough without further fiddling on this in v11 adding the risk that new deprecations are thrown for existing v11 instances.

Is this fine with you?

Actions #3

Updated by Sybille Peters almost 2 years ago

  • Status changed from Needs Feedback to Closed

Is this fine with you?

ok, closing

Actions

Also available in: Atom PDF