Review main Merged

86238[BUGFIX] Fix additional attribute handling in MediaViewHelper

Karsten Nowak CR +2 V +2 Easy +18 −1 updated 09/24/24, 19:53

Commit message

With deprecation #104223 some attributes for TagBased ViewHelpers are
available in `$this->additionalArguments` which were previously
located in `$this->arguments`. This has been addressed for Core
ViewHelpers in a previous patch. However, the custom implementation in
`MediaViewHelper` has been missed and thus does not work as expected.

This patch addresses the issue by merging both argument arrays, which
restores the previous behavior.

Also 3 new test cases are added:

* video with a title
* video with empty title
* video with title is set to "null"

Review

  • Code review CR +2 Done
    • Simon Praetorius +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Simon Praetorius +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1417

  1. Karsten Nowak uploaded patch set 1 09/20/24, 08:43

  2. core-ci voted on patch set 1 V +1 09/20/24, 08:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66298

  3. Simon Praetorius commented on patch set 1 09/20/24, 13:26

    Can you add a test case that verifies the problem?
  4. Karsten Nowak commented on patch set 1 09/22/24, 18:55

    Reply

    Test case? What exactly do you have in mind?
  5. Simon Praetorius commented on patch set 1 09/22/24, 20:01

    Reply

    There are already some functional tests for the MediaViewHelper. Apparently they didn‘t cover the use case you describe. It would be great to cover the problem you discovered and fixed by that test to avoid potential regressions in the future. Here is the test file: https://github.com/TYPO3/typo3/blob/main/typo3/sysext/fluid/Tests/Functional/ViewHelpers/MediaViewHelperTest.php If you need any help, feel free to contact me via Slack!
  6. Karsten Nowak uploaded patch set 2 V +1 09/24/24, 15:58

  7. core-ci voted on patch set 2 V +1 09/24/24, 16:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66510

  8. Simon Praetorius voted on patch set 2 CR +1 V +1 09/24/24, 16:22

  9. Simon Praetorius commented on patch set 2 09/24/24, 16:28

    Reply

    Done
  10. Garvin Hicking voted on patch set 2 CR +1 V +1 09/24/24, 16:33

  11. Garvin Hicking commented on patch set 2 09/24/24, 16:35

    Unsure about the commit message being written in first person, I just noticed...?
  12. Garvin Hicking voted on patch set 2 CR 0 09/24/24, 16:35

  13. Simon Praetorius updated the commit message in patch set 3 CR +1 V +1 09/24/24, 17:17

  14. core-ci voted on patch set 3 V +1 09/24/24, 17:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66511

  15. Garvin Hicking commented on patch set 3 CR +1 V +1 09/24/24, 19:27

    Thanks!👌🏻
  16. Simon Praetorius voted on patch set 3 CR +2 V +2 09/24/24, 19:52

  17. Simon Praetorius merged patch set 4 09/24/24, 19:53