Review 10.4 Abandoned

70256[BUGFIX] Correct return type for FileReference methods

Anja Leichsenring CR 0 V 0 Easy +30 −3 updated 08/23/21, 15:59

Commit message

The @return annotation for the following FileReference methods is set
to "string", but these methods can also return null:

- getTitle()
- getAlternative()
- getDescription()

To avoid problems with code quality tools and to ensure type
safety the return value of these methods is always casted to a
string.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 89

  1. Anja Leichsenring commented on patch set 1 08/09/21, 18:09

    Cherry Picked from branch master.
  2. core-ci voted on patch set 1 V +1 08/09/21, 18:21 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14394

  3. Chris Müller voted on patch set 1 CR +1 08/10/21, 15:52

  4. Stefan Bürk voted on patch set 1 CR +1 08/14/21, 13:46

  5. Stefan Bürk voted on patch set 1 V +1 08/14/21, 13:46

  6. Oli Bartsch commented on patch set 1 08/17/21, 12:41

    I think it can not be ruled out that extension currently rely on those methods returning null - even if PHPDoc tells different. What do you think about making this master only? This way we could also add return types.
  7. Oliver Klee voted on patch set 1 CR +1 08/17/21, 12:48

  8. Chris Müller commented on patch set 1 08/17/21, 14:19

    Reply Unresolved

    I am fine with master-only.
  9. Anja Leichsenring abandoned the change 08/23/21, 15:59

    master only