Skip to content

Commit 4b04c38

Browse files
authored
[!!!][TASK] Remove deprecated fluid RenderingContext request get&set (#5037)
Resolves: TYPO3-Documentation/Changelog-To-Doc#1128 Releases: main
1 parent 9426347 commit 4b04c38

File tree

3 files changed

+3
-43
lines changed

3 files changed

+3
-43
lines changed

Documentation/ApiOverview/RequestLifeCycle/Typo3Request.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@ The request object compatible with the PSR-7
7070
ViewHelper
7171
----------
7272

73-
.. deprecated:: 13.3
74-
The following methods have been marked as deprecated in TYPO3 v13.3 and will
75-
be removed with TYPO3 v14:
73+
.. versionchanged:: 14.0
74+
The following methods have been removed with TYPO3 v14:
7675

7776
* :php:`TYPO3\CMS\Fluid\Core\Rendering\RenderingContext->setRequest()`
7877
* :php:`TYPO3\CMS\Fluid\Core\Rendering\RenderingContext->getRequest()`
@@ -84,12 +83,6 @@ it is set.
8483
.. literalinclude:: _CodeSnippets/_ViewHelper.php
8584
:caption: EXT:my_extension/Classes/ViewHelpers/MyViewHelper.php
8685

87-
To stay compatible to previous TYPO3 versions while avoiding deprecation notices,
88-
the following code can be used:
89-
90-
.. literalinclude:: _CodeSnippets/_ViewHelperV12.php
91-
:caption: EXT:my_extension/Classes/ViewHelpers/MyViewHelper.php
92-
9386
.. _typo3-request-user-function:
9487

9588
User function

Documentation/ApiOverview/RequestLifeCycle/_CodeSnippets/_ViewHelperV12.php

Lines changed: 0 additions & 30 deletions
This file was deleted.

Documentation/ExtensionArchitecture/Extbase/Reference/_UriBuilder/_MyLinkViewHelper.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ public function __construct(private UriBuilder $uriBuilder) {}
1414

1515
public function render(): string
1616
{
17-
if (method_exists($this->renderingContext, 'getRequest')) {
18-
// TYPO3 v12 compatibility
19-
$request = $this->renderingContext->getRequest();
20-
} elseif ($this->renderingContext->hasAttribute(ServerRequestInterface::class)) {
17+
if ($this->renderingContext->hasAttribute(ServerRequestInterface::class)) {
2118
// TYPO3 v13+ compatibility
2219
$request = $this->renderingContext->getAttribute(ServerRequestInterface::class);
2320
} else {

0 commit comments

Comments
 (0)