Project

General

Profile

Actions

Task #104442

closed

Improve ViewHelper tests for "required"

Added by Stephan Großberndt 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Category:
Fluid
Target version:
-
Start date:
2024-07-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

ViewHelpers that do not register "required" as an argument (e.g. `PasswordViewHelper`) pass any value since Fluid v2.12.0 (see https://github.com/TYPO3/Fluid/pull/859).

ViewHelpers that register "required" as an argument (e.g. `TextfieldViewHelper`) interpret the specified value as a bool and if true always render `required="required"` and omit the attribute if false.

Once this registration will be removed, `required="false"` will be passed through as an arbitrary value and rendered in the browser.

While `required="false"` is technically incorrect, browsers correctly interpret the sole existence of the attribute as "is required" no matter which value is set.

Improve the tests to make sure this case is handled correctly once the registration for "required" in the ViewHelpers is removed:
Usage of `required="false"` should be logged as deprecated and simply be removed from the ViewHelper usage.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Task #104436: Use standard attributes in EXT:feloginClosedStephan Großberndt2024-07-19

Actions
Related to TYPO3 Core - Bug #104441: Correct values for attribute "required" in felogin templatesClosedStephan Großberndt2024-07-19

Actions
Related to TYPO3 Core - Task #104507: Improve test coverage of ViewHelper argumentsClosedSimon Praetorius2024-07-31

Actions
Actions #1

Updated by Stephan Großberndt 4 months ago

  • Related to Task #104436: Use standard attributes in EXT:felogin added
Actions #2

Updated by Stephan Großberndt 4 months ago

  • Related to Bug #104441: Correct values for attribute "required" in felogin templates added
Actions #3

Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85312

Actions #4

Updated by Gerrit Code Review 4 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85312

Actions #5

Updated by Gerrit Code Review 4 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85312

Actions #6

Updated by Christian Kuhn 4 months ago

  • Related to Task #104507: Improve test coverage of ViewHelper arguments added
Actions #7

Updated by Christian Kuhn 4 months ago

  • Status changed from Under Review to Closed

patch has been abandoned due to its close relation to a different change that tests the abstract as well. i hope it is ok to close here for now.

Actions

Also available in: Atom PDF