From 82d2e5285adbf6635c1586150e026453c1d225a6 Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:14:58 +0200 Subject: [PATCH] [Deprecation] renderStatic() for Fluid ViewHelpers (#147) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Deprecation] renderStatic() for Fluid ViewHelpers See also: https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-CoreApi/pull/4735 References: TYPO3-Documentation/Changelog-To-Doc#1008 * Update Classes/ViewHelpers/GravatarViewHelper.php Co-authored-by: Stefan Frömken * Update Resources/Private/Templates/Post/Show.html --------- Co-authored-by: Stefan Frömken --- Build/rector/rector.php | 4 +++- Classes/ViewHelpers/GravatarViewHelper.php | 19 ++++++++----------- Resources/Private/Templates/Post/Show.html | 9 ++++++++- ext_emconf.php | 2 +- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Build/rector/rector.php b/Build/rector/rector.php index b8c6f57..f6491a9 100644 --- a/Build/rector/rector.php +++ b/Build/rector/rector.php @@ -16,6 +16,7 @@ */ use Rector\Config\RectorConfig; +use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector; use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector; use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector; use Ssch\TYPO3Rector\CodeQuality\General\ConvertImplicitVariablesToExplicitGlobalsRector; @@ -46,7 +47,7 @@ ConvertImplicitVariablesToExplicitGlobalsRector::class, ]) ->withConfiguredRule(ExtEmConfRector::class, [ - ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '13.1.0-13.99.99', + ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '13.3.0-13.99.99', ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [], ]) // If you use importNames(), you should consider excluding some TYPO3 files. @@ -54,5 +55,6 @@ // AddLiteralSeparatorToNumberRector would make the exception codes more readable. // But as they are just timestamps this is not needed/wanted. AddLiteralSeparatorToNumberRector::class, + RemoveParentCallWithoutParentRector::class, ]) ; diff --git a/Classes/ViewHelpers/GravatarViewHelper.php b/Classes/ViewHelpers/GravatarViewHelper.php index 36bcb01..159e42e 100644 --- a/Classes/ViewHelpers/GravatarViewHelper.php +++ b/Classes/ViewHelpers/GravatarViewHelper.php @@ -8,7 +8,6 @@ use TYPO3\CMS\Core\Utility\HttpUtility; use TYPO3\CMS\Core\Utility\MathUtility; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; /* * This file is part of the TYPO3 CMS project. @@ -28,7 +27,11 @@ * See http://www.gravatar.com * = Examples = * - * + * * * * @@ -36,8 +39,6 @@ */ class GravatarViewHelper extends AbstractTagBasedViewHelper { - use CompileWithRenderStatic; - /** * @var string */ @@ -47,15 +48,11 @@ public function __construct(private readonly UriFactory $uriFactory) parent::__construct(); } - /** - * Initialize arguments - */ public function initializeArguments(): void { - $this->registerUniversalTagAttributes(); - $this->registerArgument('emailAddress', 'string', '', true) - ->registerArgument('defaultImageUri', 'string', '', false) - ->registerArgument('size', 'int', '', false); + $this->registerArgument('emailAddress', 'string', '', true); + $this->registerArgument('defaultImageUri', 'string', ''); + $this->registerArgument('size', 'int', ''); } public function render(): string diff --git a/Resources/Private/Templates/Post/Show.html b/Resources/Private/Templates/Post/Show.html index f89a963..0c266dc 100644 --- a/Resources/Private/Templates/Post/Show.html +++ b/Resources/Private/Templates/Post/Show.html @@ -48,7 +48,14 @@

  1. - + {comment.author}

    diff --git a/ext_emconf.php b/ext_emconf.php index 9c2ee7c..c2399fd 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -11,7 +11,7 @@ 'state' => 'stable', 'constraints' => [ 'depends' => [ - 'typo3' => '13.1.0-13.99.99', + 'typo3' => '13.3.0-13.99.99', ], 'conflicts' => [], 'suggests' => [],