Commit 6661c354 authored by Christian Kuhn's avatar Christian Kuhn Committed by Stefan Bürk
Browse files

[TASK] Use Typo3Fluid TemplateAwareViewInterface

Fluid 2.7.2 brought optional TemplateAwareViewInterface.
This is used in two places for proper signatures and makes
phpstan a bit more happy.

> Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Resolves: #98057
Related: https://github.com/TYPO3/Fluid/pull/586
Releases: main
Change-Id: I8b55af0d58b86a0f68dc3772e3ba66716ea32202
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73611

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
parent 0b9df659
......@@ -50,11 +50,6 @@ parameters:
count: 1
path: ../../typo3/sysext/backend/Classes/Form/Behavior/UpdateValueOnFieldChange.php
-
message: "#^Method TYPO3Fluid\\\\Fluid\\\\View\\\\ViewInterface\\:\\:render\\(\\) invoked with 1 parameter, 0 required\\.$#"
count: 1
path: ../../typo3/sysext/backend/Classes/Form/Element/ImageManipulationElement.php
-
message: "#^Offset 'arguments' on array\\{arguments\\: string\\|false\\} on left side of \\?\\? always exists and is not nullable\\.$#"
count: 1
......@@ -1310,11 +1305,6 @@ parameters:
count: 1
path: ../../typo3/sysext/core/Classes/Utility/IpAnonymizationUtility.php
-
message: "#^Method TYPO3Fluid\\\\Fluid\\\\View\\\\ViewInterface\\:\\:render\\(\\) invoked with 1 parameter, 0 required\\.$#"
count: 1
path: ../../typo3/sysext/core/Classes/View/FluidViewAdapter.php
-
message: "#^Parameter \\#2 \\$attributeValue of method TYPO3Fluid\\\\Fluid\\\\Core\\\\ViewHelper\\\\TagBuilder\\:\\:addAttribute\\(\\) expects array\\|string\\|Traversable\\|null, int given\\.$#"
count: 1
......
......@@ -31,6 +31,7 @@ use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3\CMS\Core\Utility\StringUtility;
use TYPO3Fluid\Fluid\View\TemplateAwareViewInterface;
use TYPO3Fluid\Fluid\View\TemplateView;
use TYPO3Fluid\Fluid\View\ViewInterface;
......@@ -123,7 +124,7 @@ class ImageManipulationElement extends AbstractFormElement
],
];
protected ViewInterface $templateView;
protected ViewInterface&TemplateAwareViewInterface $templateView;
/**
* @var UriBuilder
......
......@@ -18,6 +18,7 @@ declare(strict_types=1);
namespace TYPO3\CMS\Core\View;
use TYPO3\CMS\Core\View\ViewInterface as CoreViewInterface;
use TYPO3Fluid\Fluid\View\TemplateAwareViewInterface as FluidTemplateAwareViewInterface;
use TYPO3Fluid\Fluid\View\ViewInterface as FluidViewInterface;
/**
......@@ -26,7 +27,7 @@ use TYPO3Fluid\Fluid\View\ViewInterface as FluidViewInterface;
class FluidViewAdapter implements CoreViewInterface
{
public function __construct(
protected readonly FluidViewInterface $view,
protected readonly FluidViewInterface&FluidTemplateAwareViewInterface $view,
) {
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment