diff --git a/composer.json b/composer.json index e4f6959bb7225648b3b1afc3e93dfd65a919318f..fd4eb0ff88a515853d599814fe32ad045ce20de0 100644 --- a/composer.json +++ b/composer.json @@ -80,7 +80,7 @@ "typo3/cms-composer-installers": "^2.0 || ^3.0", "typo3/phar-stream-wrapper": "^3.1.6", "typo3/symfony-psr-event-dispatcher-adapter": "^1.0 || ^2.0", - "typo3fluid/fluid": "^2.6.10" + "typo3fluid/fluid": "^2.7.0" }, "require-dev": { "composer-runtime-api": "^2.0", diff --git a/composer.lock b/composer.lock index e171e5d14d66a143b2b5d61ae663a2b305c47f98..010538df23854607391823fe900719dc69538f40 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6f11a2c93ad6fec94d41cbd9f2623839", + "content-hash": "0a6013a98ba1ec2a7ab5e3719aa00cbe", "packages": [ { "name": "bacon/bacon-qr-code", @@ -4569,16 +4569,16 @@ }, { "name": "typo3fluid/fluid", - "version": "2.6.10", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/TYPO3/Fluid.git", - "reference": "f20db4e74cf9803c6cffca2ed2f03e1b0b89d0dc" + "reference": "3420f8cfd6afcfa98e077f40b8d34f9be12f079e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TYPO3/Fluid/zipball/f20db4e74cf9803c6cffca2ed2f03e1b0b89d0dc", - "reference": "f20db4e74cf9803c6cffca2ed2f03e1b0b89d0dc", + "url": "https://api.github.com/repos/TYPO3/Fluid/zipball/3420f8cfd6afcfa98e077f40b8d34f9be12f079e", + "reference": "3420f8cfd6afcfa98e077f40b8d34f9be12f079e", "shasum": "" }, "require": { @@ -4606,9 +4606,9 @@ "description": "The TYPO3 Fluid template rendering engine", "support": { "issues": "https://github.com/TYPO3/Fluid/issues", - "source": "https://github.com/TYPO3/Fluid/tree/2.6.10" + "source": "https://github.com/TYPO3/Fluid/tree/2.7.0" }, - "time": "2020-11-16T21:38:14+00:00" + "time": "2021-05-31T06:39:11+00:00" }, { "name": "webmozart/assert", diff --git a/phpstan.neon b/phpstan.neon index 26e7edd40ceae61de245465803d24bb51d1b42f7..2da86236d902c8e08d964c901ad27ba56fc6ba9e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -62,10 +62,6 @@ parameters: message: "#^Unsafe usage of new static\\(\\)\\.$#" count: 1 path: typo3/sysext/workspaces/Classes/Domain/Record/WorkspaceRecord.php - - - message: "#^Class TYPO3Fluid\\\\Fluid\\\\Core\\\\Parser\\\\TemplateParser does not have a constructor and must be instantiated without any parameters\\.$#" - count: 1 - path: typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php - message: "#^Call to an undefined static method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContext\\:\\:getParserConfiguration\\(\\)\\.$#" count: 1 diff --git a/typo3/sysext/adminpanel/composer.json b/typo3/sysext/adminpanel/composer.json index bdcde8c112e3a688819c1fac8e269bbfd613fa6f..eab86c818bbb178e2cf7dbdee9c3e0afb2d9beb7 100644 --- a/typo3/sysext/adminpanel/composer.json +++ b/typo3/sysext/adminpanel/composer.json @@ -27,7 +27,7 @@ "typo3/cms-core": "11.3.*@dev", "typo3/cms-fluid": "11.3.*@dev", "typo3/cms-frontend": "11.3.*@dev", - "typo3fluid/fluid": "^2.6.10" + "typo3fluid/fluid": "^2.7.0" }, "conflict": { "typo3/cms": "*" diff --git a/typo3/sysext/core/composer.json b/typo3/sysext/core/composer.json index 117a6e1ec52e077c86f9af45c48bb3c516a5b04e..40effa451e375b2f4e669459093f9c076d0c5f05 100644 --- a/typo3/sysext/core/composer.json +++ b/typo3/sysext/core/composer.json @@ -64,7 +64,7 @@ "typo3/cms-composer-installers": "^2.0 || ^3.0", "typo3/phar-stream-wrapper": "^3.1.6", "typo3/symfony-psr-event-dispatcher-adapter": "^1.0 || ^2.0", - "typo3fluid/fluid": "^2.6.10" + "typo3fluid/fluid": "^2.7.0" }, "require-dev": { "codeception/codeception": "^4.1.12", diff --git a/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php b/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php index 7310367b998789f25c1b339bb73dfa6794818da2..0752e41502fc11a75b09c13b395b731d504a5bce 100644 --- a/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php +++ b/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php @@ -32,7 +32,6 @@ use TYPO3Fluid\Fluid\Core\Parser\TemplateProcessorInterface; use TYPO3Fluid\Fluid\Core\Variables\StandardVariableProvider; use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInvoker; use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperVariableContainer; -use TYPO3Fluid\Fluid\View\ViewInterface; /** * Class RenderingContext @@ -69,29 +68,18 @@ class RenderingContext extends \TYPO3Fluid\Fluid\Core\Rendering\RenderingContext $this->viewHelperVariableContainer = $viewHelperVariableContainer; } - /** - * @param ViewInterface $view - */ - public function __construct(ViewInterface $view = null) + public function __construct() { - if ($view !== null) { - // Note: if $view is received here this indicates internal framework instancing - // and it is safe to call the parent constructor. Custom, non-view-providing - // usages will only perform the initialisation below (which is sufficient mind you!) - parent::__construct($view); - } else { - // Reproduced partial initialisation from parent::__construct; minus the custom - // implementations we attach below. - $this->setTemplateParser(new TemplateParser($this)); - if (method_exists($this, 'setTemplateCompiler')) { - $this->setTemplateCompiler(new TemplateCompiler()); - } - if (method_exists($this, 'setViewHelperInvoker')) { - $this->setViewHelperInvoker(new ViewHelperInvoker()); - } - $this->setViewHelperVariableContainer(new ViewHelperVariableContainer()); - $this->setVariableProvider(new StandardVariableProvider()); + // Reproduced partial initialisation from parent::__construct; minus the custom implementations we attach below. + $this->setTemplateParser(new TemplateParser()); + if (method_exists($this, 'setTemplateCompiler')) { + $this->setTemplateCompiler(new TemplateCompiler()); + } + if (method_exists($this, 'setViewHelperInvoker')) { + $this->setViewHelperInvoker(new ViewHelperInvoker()); } + $this->setViewHelperVariableContainer(new ViewHelperVariableContainer()); + $this->setVariableProvider(new StandardVariableProvider()); $objectManager = GeneralUtility::makeInstance(ObjectManager::class); if (method_exists($this, 'setTemplateProcessors')) { diff --git a/typo3/sysext/fluid/Classes/View/AbstractTemplateView.php b/typo3/sysext/fluid/Classes/View/AbstractTemplateView.php index b830ee047fdb0955e5f92b3f9577018ad33acee4..21392b5aa37d576b85f7894cfb98b053d770fe86 100644 --- a/typo3/sysext/fluid/Classes/View/AbstractTemplateView.php +++ b/typo3/sysext/fluid/Classes/View/AbstractTemplateView.php @@ -50,7 +50,7 @@ abstract class AbstractTemplateView extends TemplateView implements ViewInterfac public function __construct(RenderingContextInterface $context = null) { if (!$context) { - $context = GeneralUtility::makeInstance(ObjectManager::class)->get(RenderingContext::class, $this); + $context = GeneralUtility::makeInstance(ObjectManager::class)->get(RenderingContext::class); } parent::__construct($context); } diff --git a/typo3/sysext/fluid/Classes/View/StandaloneView.php b/typo3/sysext/fluid/Classes/View/StandaloneView.php index 8e0bba68e1e5cef06117b9eb5ae0e8e64c7f6efe..5052c8529ab0e6b59c1957fa2c1b8d337661ed0f 100644 --- a/typo3/sysext/fluid/Classes/View/StandaloneView.php +++ b/typo3/sysext/fluid/Classes/View/StandaloneView.php @@ -49,7 +49,7 @@ class StandaloneView extends AbstractTemplateView $configurationManager->setContentObject($contentObject); $request = $objectManager->get(Request::class); - $renderingContext = $objectManager->get(RenderingContext::class, $this); + $renderingContext = $objectManager->get(RenderingContext::class); $renderingContext->setRequest($request); parent::__construct($renderingContext); } diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/LinkViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/LinkViewHelperTest.php index 9a3410e890238d1031de3eed71f1c33c43745f49..d54fb581dcfb0c4852faf765496266d74ec440d5 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/LinkViewHelperTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/LinkViewHelperTest.php @@ -71,9 +71,10 @@ class LinkViewHelperTest extends ViewHelperBaseTestcase ->setMethods(['registerTagAttribute', 'registerUniversalTagAttributes', 'registerArgument']) ->getMock(); - $viewHelper->expects(self::exactly(5))->method('registerArgument')->withConsecutive( + $viewHelper->expects(self::exactly(6))->method('registerArgument')->withConsecutive( ['additionalAttributes', 'array', self::anything()], ['data', 'array', self::anything()], + ['aria', 'array', self::anything()], ['route', 'string', self::anything()], ['parameters', 'array', self::anything()], ['referenceType', 'string', self::anything()] diff --git a/typo3/sysext/fluid/composer.json b/typo3/sysext/fluid/composer.json index 0a9a35c20c1c88b2767ac2f4d35ec099a8c3fa30..71786a0409ca15bc6df1892cfb4cde1cd47c5f00 100644 --- a/typo3/sysext/fluid/composer.json +++ b/typo3/sysext/fluid/composer.json @@ -22,7 +22,7 @@ "symfony/dependency-injection": "^5.2", "typo3/cms-core": "11.3.*@dev", "typo3/cms-extbase": "11.3.*@dev", - "typo3fluid/fluid": "^2.6.10" + "typo3fluid/fluid": "^2.7.0" }, "conflict": { "typo3/cms": "*" diff --git a/typo3/sysext/redirects/composer.json b/typo3/sysext/redirects/composer.json index 36902c8779ac733ccac0c9dcc2651bb10e1a78a9..b601689c3f44daf707367472b01df1d5dce39daf 100644 --- a/typo3/sysext/redirects/composer.json +++ b/typo3/sysext/redirects/composer.json @@ -25,7 +25,7 @@ "symfony/console": "^5.2", "typo3/cms-backend": "11.3.*@dev", "typo3/cms-core": "11.3.*@dev", - "typo3fluid/fluid": "^2.6.10" + "typo3fluid/fluid": "^2.7.0" }, "conflict": { "typo3/cms": "*"