Project

General

Profile

Actions

Bug #91401

closed

Fluid AbstractViewHelper::getArguments incompatibilities

Added by Andreas Kiessling almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-05-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In #90289 some compatibility code for Fluid 3.0 was added to TYPO3 8.7 which apparently break my project.

[14-May-2020 11:31:05 UTC] PHP Fatal error: Declaration of FluidTYPO3\Vhs\ViewHelpers\Menu\AbstractMenuViewHelper::getArguments() must be compatible with TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::getArguments(): TYPO3Fluid\Fluid\Component\Argument\ArgumentCollection in .../public/typo3conf/ext/vhs/Classes/ViewHelpers/Menu/AbstractMenuViewHelper.php on line 21

The setup uses PHP 7.1 and vhs in version 4.2 which already has a getArguments method in the AbstractMenuViewHelper.

Additionally the code in the AbstractViewHelper::getArguments seems pretty weird:

    public function getArguments(): ArgumentCollection
    {
        if (method_exists($this, 'registerRenderMethodArguments')) {
            $this->registerRenderMethodArguments();
        }
        return parent::getArguments();
    }

registerRenderMethodArguments exists in that class -> why do we need to check if it exists?
It calls parent::getArguments, but \TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper in version 2.6.6 of typo3fluid/fluid does not have that method, only Fluid 3 has it.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #90289: AbstractViewHelper class of TYPO3 8.7 can be compatible with Fluid 3.0 with minor changesClosed2020-02-01

Actions
Actions #1

Updated by Andreas Kienast almost 4 years ago

  • Status changed from New to Needs Feedback

Hello,

Can you please try to upgrade EXT:vhs to version 6.0, where the offending code isn't available anymore?

Actions #2

Updated by Andreas Kiessling almost 4 years ago

That's what i'm testing right now..
Something seems to be off on that staging server with the error reporting / handling, since i did not get these errors in my local setup. (Or the local setup is screwed up)
Nevertheless that change probably should not have gotten merged in the late stage of 8.7.
I'm wondering who will run 8.7 with Fluid 3 :/

Actions #3

Updated by Oliver Hader almost 4 years ago

  • Related to Task #90289: AbstractViewHelper class of TYPO3 8.7 can be compatible with Fluid 3.0 with minor changes added
Actions #4

Updated by Andreas Kiessling almost 4 years ago

The vhs upgrade worked, imho we can close the issue.

Actions #5

Updated by Björn Jacob almost 4 years ago

  • Status changed from Needs Feedback to Closed

Closing as requested by the author. Thanks for your response mate!

Actions #6

Updated by Felix Buenemann almost 4 years ago

I think this issue should be re-opened.

It broke multiple of our sites when upgrading from TYPO3 8.7.31 to 8.7.32.

Minor updates should only have non-breaking changes, so I think this is a bug, even if it can be fixed by upgrading the VHS ext.

Actions #7

Updated by Felix Buenemann almost 4 years ago

As noted by me in #90289 the change of the return type of the TYPO3\CMS\Fluid\Core\ViewHelper::getArguments() from array (as stated in the doc comments), to ArgumentCollection will break any downstream classes that implement their own getArguments(), so while upgrading VHS might work in some projects I don't think it can be seen as the solution to the problem.

Instead it should be investigated wether the Fluid 3 support can be adapted to not break backwards compatibility.

Actions

Also available in: Atom PDF