Review main Merged

75512[FEATURE] Add TypeConverter for enums

Matthias Vogel CR +2 V +2 Hard +358 −2 updated 09/07/22, 17:17

Commit message

With PHP 8.1 we got Enums, to use them also in our extbase actions,
a new TypeConverter is added with this patch.

The EnumConverter is automatically used if the target type is an enum.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Georg Ringer +1
    • Benni Mack +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Georg Ringer +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 2943

Show 1318 earlier messages
  1. Matthias Vogel uploaded patch set 1 08/18/22, 16:11

  2. Matthias Vogel updated the commit message in patch set 2 08/18/22, 16:15

  3. core-ci voted on patch set 1 V -1 08/18/22, 16:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30273

  4. core-ci voted on patch set 2 V -1 08/18/22, 16:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30274

  5. Chris Müller commented on patch set 2 CR -1 08/18/22, 17:21

    Pplease also provide a feature RST describing the new feature and how it can be used.
  6. Chris Müller commented on patch set 2 08/18/22, 17:30

    EnumConverter.php:30

    EnumConverter.php:54

    Can also be removed.
  7. Matthias Vogel uploaded patch set 3 08/19/22, 06:45

  8. Matthias Vogel updated the commit message in patch set 4 08/19/22, 06:45

  9. Matthias Vogel commented on patch set 4 08/19/22, 06:46

    Reply

    Ack

    EnumConverter.php:30 Reply

    Ack

    EnumConverter.php:54 Reply

    Ack
  10. Benni Mack commented on patch set 4 08/19/22, 06:51

    Awesome feature, thanks Matthias!
  11. core-ci voted on patch set 3 V +1 08/19/22, 06:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30288

  12. core-ci voted on patch set 4 V +1 08/19/22, 06:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30289

  13. Oliver Klee commented on patch set 4 08/19/22, 09:41

    Awesome work! I've added a comment regarding marking the test code more clear.

    Enum.php:20

    Please let's give this enum a name that is more specific (and that also avoids using the reserved word "enum" as a name ;-) ). Maybe "UnbackedEnum? What do you think?
  14. Chris Müller uploaded patch set 5 08/19/22, 11:59

  15. Chris Müller commented on patch set 5 08/19/22, 12:02

    Enum.php:22

    There is a "convention" that enum cases should by UpperCamelCase, like in the PHP docs example: https://www.php.net/manual/en/language.types.enumerations.php Maybe we can adjust it. Although it is not part of the PSR standard yet, as it is too new.
  16. Chris Müller commented on patch set 5 08/19/22, 12:04

    And: I like the feature also :-) Thanks.
  17. Chris Müller uploaded patch set 6 08/19/22, 12:06

  18. core-ci voted on patch set 5 V +1 08/19/22, 12:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30311

  1. core-ci voted on patch set 6 V +1 08/19/22, 12:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30312

  2. Matthias Vogel uploaded patch set 7 08/19/22, 13:04

  3. Matthias Vogel commented on patch set 7 08/19/22, 13:04

    Enum.php:20 Reply

    Ack
  4. Matthias Vogel uploaded patch set 8 08/19/22, 13:07

  5. Matthias Vogel commented on patch set 8 08/19/22, 13:07

    Enum.php:22 Reply

    Ack
  6. Matthias Vogel uploaded patch set 9 08/19/22, 13:08

  7. core-ci voted on patch set 7 V +1 08/19/22, 13:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30320

  8. core-ci voted on patch set 8 V +1 08/19/22, 13:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30322

  9. core-ci voted on patch set 9 V +1 08/19/22, 13:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30323

  10. Matthias Vogel uploaded patch set 10 08/26/22, 08:18

  11. Matthias Vogel uploaded patch set 11 08/26/22, 08:22

  12. core-ci voted on patch set 11 V +1 08/26/22, 08:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30455

  13. core-ci voted on patch set 10 V +1 08/26/22, 08:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30454

  14. Oliver Klee commented on patch set 11 08/26/22, 09:52

    EnumConverter.php:38

    Can we use the mixed native type declaration for $source in this method and the next?
  15. Benni Mack commented on patch set 12 09/06/22, 12:55

    Published edit on patch set 11.
  16. Benni Mack commented on patch set 13 09/06/22, 12:56

    Published edit on patch set 12.
  17. core-ci voted on patch set 13 V +1 09/06/22, 13:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30647

  18. core-ci voted on patch set 12 V +1 09/06/22, 13:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30646

  19. Benni Mack commented on patch set 13 09/06/22, 14:42

    EnumConverter.php:38 Reply

    Done
  20. Benni Mack uploaded patch set 14 09/06/22, 19:50

  21. Benni Mack voted on patch set 14 V +1 CR +1 09/06/22, 19:50

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

  23. Georg Ringer voted on patch set 14 V +1 CR +1 09/06/22, 20:39

  24. Anja Leichsenring voted on patch set 14 V +2 CR +2 09/07/22, 17:17

  25. Anja Leichsenring merged patch set 15 09/07/22, 17:17