Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[!!!][TASK] Mitigate depecated flash message severity #411

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

sbuerk
Copy link
Contributor

@sbuerk sbuerk commented Dec 19, 2024

Since TYPO3 v12 the flash message severity are deprecated in favour of
the ContextualFeedbackSeverity and will fail in TYPO3 v13.

This change mitigates the deprecation and removal by directly using the
native PHP Enum for TYPO3 v12 and TYPO3 v13 by:

  • Changing signature of AbstractTranslateHook::flashMessages() from
    integer to ContextualFeedbackSeverity.
  • Replace integer -1 with ContextualFeedbackSeverity::INFO in two
    places within TranslateHook. Something addon extensions needs to
    handle on their own.

[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Deprecation-97787-SeveritiesOfFlashMessagesAndReportsDeprecated.html

Since TYPO3 v12 the flash message severity are deprecated in favour of
the `ContextualFeedbackSeverity` and will fail in TYPO3 v13.

This change mitigates the deprecation and removal by directly using the
native PHP Enum for TYPO3 v12 and TYPO3 v13 by:

* Changing signature of `AbstractTranslateHook::flashMessages()` from
  integer to `ContextualFeedbackSeverity`.
* Replace integer `-1` with `ContextualFeedbackSeverity::INFO` in two
  places within `TranslateHook`. Something addon extensions needs to
  handle on their own.

[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Deprecation-97787-SeveritiesOfFlashMessagesAndReportsDeprecated.html
@NarkNiro NarkNiro self-requested a review December 19, 2024 15:54
@sbuerk sbuerk merged commit 099d3c8 into main Dec 19, 2024
8 checks passed
@sbuerk sbuerk deleted the contextualfeedbackseverity branch December 19, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants