Review main Merged Breaking

74290[!!!][TASK] Add native types to MailUtility

crell CR +2 V +2 Normal +33 −35 updated 05/07/22, 18:08

Commit message

And remove phpstan exceptions along the way.

Review

  • Code review CR +2 Done
    • Nikita Hovratov +2
    • Oliver Klee +1
  • Verified V +2 Done
    • Nikita Hovratov +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 3

Files 4

Review log 2633

Show 68 earlier messages
  1. crell uploaded patch set 1 04/13/22, 16:45

  2. crell updated the commit message in patch set 2 04/13/22, 16:47

  3. Oliver Klee voted on patch set 2 CR +1 04/13/22, 16:52

  4. core-ci voted on patch set 2 V +1 04/13/22, 16:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25997

  5. core-ci voted on patch set 1 V +1 04/13/22, 17:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25996

  6. Simon Schaufelberger voted on patch set 2 V +1 CR +1 04/14/22, 18:30

  7. Oliver Hader commented on patch set 2 CR -1 05/02/22, 09:41

    MailUtility.php:58

    That's a different behavior - previously it was an implicit `!empty($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'])` - resulting in `null` for `$defaultMailFromName = ''` - now it returns that blank string `''`
  8. crell uploaded patch set 3 05/02/22, 16:44

  1. crell commented on patch set 2 05/02/22, 16:44

    MailUtility.php:58 Reply

    Ack
  2. core-ci voted on patch set 3 V +1 05/02/22, 16:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26739

  3. Oliver Klee commented on patch set 3 05/02/22, 17:50

    MailUtility.php:58

    Please let’s make the check explicit: (is_string($name) && $name !== ‘’) (That is a slight change in behaviors as “0” now won’t be returned if it is set, but that’s acceptable as it’s more a bug fix IMHO.)
  4. Oliver Klee commented on patch set 3 05/02/22, 18:00

    MailUtility.php:58 Reply

    Ah, sorry, it’s the other way around. Anyway, please let’s make this explicit instead of relying on what a bool cast does.
  5. crell commented on patch set 3 05/02/22, 21:35

    MailUtility.php:58 Reply

    If we're going to make subtle behavior changes around falsey values, I'd prefer the original code (turn any non-string into null). I've been trying to avoid any behavior changes if I can help it, unless it's an obvious bug fix.
  6. Oliver Klee commented on patch set 3 05/02/22, 21:56

    MailUtility.php:58 Reply

    Without a behavior change, I’d propose this snippet to avoid the implicit bool cast: return (!empty($name) && is_string($name)) ? $name : null;
  7. crell uploaded patch set 4 05/03/22, 17:02

  8. crell commented on patch set 3 05/03/22, 17:02

    MailUtility.php:58 Reply

    Done
  9. Oliver Klee voted on patch set 4 CR +1 05/03/22, 17:03

  10. core-ci voted on patch set 4 V +1 05/03/22, 17:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26773

  11. Nikita Hovratov uploaded patch set 5 05/06/22, 11:51

  12. Nikita Hovratov voted on patch set 5 V +1 CR +1 05/06/22, 11:53

  13. Oliver Klee voted on patch set 5 CR +1 05/06/22, 11:57

  14. core-ci voted on patch set 5 V +1 05/06/22, 12:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26907

  15. Stefan Bürk commented on patch set 5 CR -1 05/06/22, 13:46

    MailUtility.php:32

    Was not part of this patch, but as this patch changes the docblock we should add a correct description, as there are two kind of array structures 1. string-key: email(-address) value: name 2. int-key: pos value: email(-address) 3. no-array: null (not configured)

    MailUtility.php:94

    Was not part of this patch, but as this patch changes the docblock we should add a correct description, as there are two kind of array items are possible 1. string-key: email(-address) value: name 2. int-key: pos value: email(-address) The "replyToName <replyTo@example.com>" is somehow misleading - or not ?
  16. Nikita Hovratov uploaded patch set 6 05/06/22, 14:06

  17. Nikita Hovratov commented on patch set 5 V +1 CR +1 05/06/22, 14:08

    MailUtility.php:94 Reply

    Thanks for the hint. Adjusted the doc block message. Removed the misleading sentence, as well (maybe copy paste from the past?)
  18. Nikita Hovratov commented on patch set 6 05/06/22, 14:08

    MailUtility.php:32 Reply

    Done
  19. Oliver Klee voted on patch set 6 CR +1 05/06/22, 14:13

  20. core-ci voted on patch set 6 V +1 05/06/22, 14:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26919

  21. Nikita Hovratov uploaded patch set 7 05/07/22, 17:37

  22. core-ci voted on patch set 7 V +1 05/07/22, 17:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26972

  23. Oliver Klee voted on patch set 7 V +1 CR +1 05/07/22, 17:55

  24. Nikita Hovratov voted on patch set 7 V +2 CR +2 05/07/22, 18:08

  25. Nikita Hovratov merged patch set 8 05/07/22, 18:08