FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
189 stars 228 forks source link

TYPO3 v8.7.32 causes incompatibility with v5.2.0 of VHS #1632

Closed nostadt closed 4 years ago

nostadt commented 4 years ago

I recently updated from T3 v8.7.31 to v8.7.32 and noticed that neither FE nor BE works. Instead I receive an error message which I could trace back to this commit:

https://github.com/TYPO3/TYPO3.CMS/commit/8a6c9a4beda16f469a5f1a123ebc7a345b20dc10

Here's the link to the commit-ChangeLog between those two T3 versions:

https://github.com/TYPO3/TYPO3.CMS/compare/v8.7.31...v8.7.32

What has happend? TYPO3 has introduced the following method in the AbstractViewHelper.

    public function getArguments(): ArgumentCollection
    {
        if (method_exists($this, 'registerRenderMethodArguments')) {
            $this->registerRenderMethodArguments();
        }
        return parent::getArguments();
    }
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 /var/www/html/typo3conf/ext/vhs/Classes/ViewHelpers/Menu/AbstractMenuViewHelper.php on line 21
nostadt commented 4 years ago

I have planned to make a PR. However, the incompatible method is not in the current development branch anymore and I could not find a branch like v5 which I could use as base for the PR. So, idk how to continue from here. If someone can explain me, if and what branch I should use as base, I am happy to give it a shot though!

n3amil commented 4 years ago

Same issue for v4 - my colleague solved the issue in his project by migrating to vhs v6, which can be alot of work if you use old vhs viewhelpers. https://github.com/TYPO3/TYPO3.CMS/commit/8a6c9a4beda16f469a5f1a123ebc7a345b20dc10 is the commit with the change

NochEinKamel commented 4 years ago

https://github.com/FluidTYPO3/vhs/commit/fa67db14ed674521e10d767071c0553a219d4d29 is the "fix" in VHS 6

nostadt commented 4 years ago

fa67db1 is the "fix" in VHS 6

Thanks for pointing that out :)

NamelessCoder commented 4 years ago

Unfortunately you'll have to upgrade VHS since the change in core is a cornerpiece of Fluid 3.0 support (which you can actually get in 8.7 by aliasing Fluid 3.0 to a 2.x version). There will not be any more releases of VHS in the 5.x branches. The good news is that there are no really breaking changes unless you use third-party ViewHelpers that extend from the abstract menu ViewHelper.

YetiCGN commented 4 years ago

Confirming that upgrading to 6.0.0 solves the compatibility issue.

nostadt commented 4 years ago

Thanks for the response. As the official way to go is the upgrade to v6, I herewith close the issue.

theLine commented 4 years ago

I've just added a commit that should be working right out of the box for vhs v5.2.