Bug #105262
openFlashMessageFinisher - configuration of severity in .form.yaml not possible
0%
Description
It's not possible to configure the severity for the FlashMessageFinisher in the .form.yaml file because the severity must be of type 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity' in the FlashMessage constructor but this cannot be achieved in the .form.yaml configuration.
Also the documentations https://docs.typo3.org/c/typo3/cms-form/main/en-us/I/Config/proto/finishersDefinition/finishers/FlashMessage.html#prototypes.prototypeIdentifier.finishersdefinition.flashmessage.options.severity and https://docs.typo3.org/c/typo3/cms-form/main/en-us/D/FinisherOptions/Index.html#apireference-finisheroptions-flashmessagefinisher are misleading as they claim, that the data type can be an integer.
The solution in v12 was this (see https://github.com/TYPO3-CMS/form/blob/12.4/Classes/Domain/Finishers/FlashMessageFinisher.php)
...
$severity = $this->parseOption('severity')
if (is_int($severity)) {
// @deprecated int type for $severity deprecated in v12, will change to Severity only in v13.
$severity = ContextualFeedbackSeverity::transform($severity);
}
...
This has been removed with v13 but it's necessary when using the yaml configuration.
Updated by Andreas Kienast 6 days ago
- Related to Feature #97787: Provide dedicated enum for severities added
Updated by Andreas Kienast 6 days ago
- Related to Task #101043: Remove deprecated code in ContextualFeedbackSeverity added
Updated by Gerrit Code Review 6 days ago
- Status changed from Accepted 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/+/86547
Updated by Gerrit Code Review 6 days 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/+/86547
Updated by Gerrit Code Review 5 days 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/+/86547
Updated by Gerrit Code Review 5 days ago
Patch set 4 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/+/86547
Updated by Gerrit Code Review 5 days ago
Patch set 5 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/+/86547
Updated by Gerrit Code Review 5 days ago
Patch set 6 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/+/86547
Updated by Gerrit Code Review 5 days ago
Patch set 7 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/+/86547
Updated by Gerrit Code Review 4 days ago
Patch set 8 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/+/86547