FluidTYPO3 / vhs

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

ViewHelperUtility disappeared with new version 6.1.3, breaking TYPO3 frontend #1826

Closed Abdull closed 11 months ago

Abdull commented 1 year ago

We just composer update our TYPO3 11 LTS installation, which upgraded VHS from 6.1.2 to 6.1.3 (Upgrading fluidtypo3/vhs (6.1.2 => 6.1.3)).

Now our TYPO3 frontend is down, because at least the ViewHelperUtility class was removed with 6.1.3.

Maybe futher classes were removed or changed? According to semantic versioning rules, such removal does not justify a "PATCH"/"bugfix" version bump, but a "MAJOR" version change, i.e. instead of "6.1.3" to "7.0.0".

I guess this was an unintentional mistake?

Problematic commit: https://github.com/FluidTYPO3/vhs/commit/f76456a340b05d14ebc720c92adaf3dd34f93984#diff-cd60321979382e4f00708d8ad1c04ee7f3ea9d075fa51b7700a679f33f1696a0

A workaround is to use the last working VHS version with "Exact Version Constraint" (i.e. not "Caret Version Range"):

composer require fluidtypo3/vhs:6.1.2
composer update
vendor/bin/typo3 cache:flush
NamelessCoder commented 11 months ago

The removed class was a proxy originally implemented to solved version differences on TYPO3 v6 and below, and was never intended for other than internal use. It has ben many, many years since VHS supported these versions so it is very redundant - and it serves no purpose to use this utility in your own projects (it only serves a purpose for TYPO3 v6 and given that VHS is no longer compatible with this branch it is technically impossible to use a version of VHS where this utilty is removed, with a version of TYPO3 where the utility could theoretically make sense to use).

Simply call $renderingContext->getVariableProvider() whenever you need the variable provider in your own code. This is compatible with any version of TYPO3 which uses the extracted Fluid library.

No other non-test-related files were removed.