Bug #104118
openAvoid hard dependency on final validation viewhelper
0%
Description
I inherited a project that xclassed the NotEmptyViewHelper and am currently updating it to v12.4
Previously, the ViewHelper was extended, but since they are final now this can't be done anymore.
Thus i copied the code over, made the adjustments --> done, or so i thought...
Now when i tried to add a new form with EXT:form, i could not get the required sign to show up. After quite some debugging i found that there are hard dependencies with instanceof checks in place
https://github.com/search?q=repo%3ATYPO3%2Ftypo3+%22instanceof+NotEmpty%22&type=code
IMHO this implementation needs to be changed, we can not have any hardcoded checks that way without being able to switch out the code. I know that the final declaration is unlikely to change, thus the NotEmptyValidator should probably have an interface or tag to indicate it is a required validator.