Review main Abandoned

62082[TASK] Refactor and streamline data processors to gain consistency

Jo Hasenau CR 0 V 0 Expert +1610 −653 updated 10/19/22, 09:46

Commit message

Adding a new data processing interface and abstract class will
ensure there always is a method to make use of additional processors.

Processor parameters are now always validated and validation
is made mandatory by the interface.

To avoid breaking changes the old interface stays available and
will just be deprecated.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 17

Review log 5188

Show 3563 earlier messages
  1. Jo Hasenau uploaded patch set 1 10/23/19, 12:38

  2. TYPO3com voted on patch set 1 V -1 10/23/19, 12:42 Completed build in 46s on Wed, 23 Oct, 12:42 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37511

  3. Mathias Brodala commented on patch set 1 10/23/19, 12:51

    DataProcessorInterface.php:46 Unresolved

    This could be added to a separate new interface AFAIS so there is no need to deprecate/replace the current one.

    DataProcessorInterface.php:53 Unresolved

    I don't think this should be part of the interface since it's an internal implementation detail.
  4. Jo Hasenau uploaded patch set 2 10/23/19, 13:06

  5. TYPO3com voted on patch set 2 V -1 10/23/19, 13:06 Completed build in 12s on Wed, 23 Oct, 01:06 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37513

  6. Jo Hasenau commented on patch set 2 10/23/19, 14:08

    > Patch Set 1: > > (2 comments) Since this is the new interface and the current interface is in the wrong place anyway, it makes sense to completely deprecate the old one and replace it with a single interface instead of dealing with two separate interfaces. The validateConfiguration method has been added to the interface on purpose, to make it a mandatory method for each data processor, even those that will not be based on the new abstract class, which already provides that method. The goal is to get rid of configuration parameters that are either breaking or just superfluous, just like it is already done with the menu processor. Hence there is setAllowedConfigurationKeys in each data processor now.
  7. Jo Hasenau uploaded patch set 3 10/23/19, 15:01

  8. TYPO3com voted on patch set 3 V -1 10/23/19, 15:03 Completed build in 24s on Wed, 23 Oct, 03:03 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37524

  9. Jo Hasenau uploaded patch set 4 10/23/19, 15:11

  10. TYPO3com voted on patch set 4 V -1 10/23/19, 15:11 Completed build in 27s on Wed, 23 Oct, 03:11 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37527

  11. Jo Hasenau uploaded patch set 5 10/23/19, 15:22

  12. TYPO3com voted on patch set 5 V -1 10/23/19, 15:25 Completed build in 30s on Wed, 23 Oct, 03:25 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37530

  13. Jo Hasenau uploaded patch set 6 10/23/19, 15:51

  14. TYPO3com voted on patch set 6 V -1 10/23/19, 15:57 Completed build in 23s on Wed, 23 Oct, 03:57 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37532

  15. Oliver Klee commented on patch set 6 10/23/19, 16:51

    DataProcessorInterface.php:49 Unresolved

    Can we have an array type declaration for $data?

    DataProcessorInterface.php:56 Unresolved

    Can we have a void return type declaration here?
  16. Jo Hasenau commented on patch set 6 10/23/19, 18:09

    > Patch Set 6: > > (2 comments) Coming with the next patch set. Still struggling with menu processors that just produce children in special situations but not with simple configurations anymore.
  17. Jo Hasenau uploaded patch set 7 10/23/19, 18:10

  18. TYPO3com voted on patch set 7 V -1 10/23/19, 18:10 Completed build in 16s on Wed, 23 Oct, 06:10 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37535

  19. Jo Hasenau uploaded patch set 8 10/23/19, 20:02

  20. TYPO3com voted on patch set 8 V -1 10/23/19, 20:03 Completed build in 20s on Wed, 23 Oct, 08:03 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37545

  21. Alexander Schnitzler uploaded patch set 9 10/24/19, 07:19

  22. TYPO3com voted on patch set 9 V -1 10/24/19, 07:29 Completed build in 09m 58s on Thu, 24 Oct, 07:29 AM Test Summary: 108 of 48376 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37553

  23. Jo Hasenau uploaded patch set 10 10/24/19, 07:55

  24. Jo Hasenau uploaded patch set 11 10/24/19, 07:59

  25. TYPO3com voted on patch set 10 V -1 10/24/19, 08:07 Completed build in 11m 47s on Thu, 24 Oct, 08:07 AM Test Summary: 7797 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37556

  26. TYPO3com voted on patch set 11 V -1 10/24/19, 08:17 Completed build in 16m 56s on Thu, 24 Oct, 08:17 AM Test Summary: 104 of 48376 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37560

  27. Oli Bartsch commented on patch set 11 10/24/19, 08:31

    AbstractDataProcessor.php:62 Unresolved

    string[]

    AbstractDataProcessor.php:70 Unresolved

    string[]

    AbstractDataProcessor.php:174 Unresolved

    Could we make this strict?

    CommaSeparatedValueProcessor.php:104 Unresolved

    $fieldName !== ''

    CommaSeparatedValueProcessor.php:156 Unresolved

    Linebreak after the description.

    CommaSeparatedValueProcessor.php:160 Unresolved

    Type hint `(array $data)`

    CommaSeparatedValueProcessor.php:162 Unresolved

    As you added strict types we should check here by using $data !== []

    DataProcessorInterface.php:45 Unresolved

    Linebreak after the description.

    DatabaseQueryProcessor.php:164 Unresolved

    Linebreak after the description.

    DatabaseQueryProcessor.php:168 Unresolved

    Type hint `(array $data)`

    DatabaseQueryProcessor.php:170 Unresolved

    As you added strict types we should check here by using $data !== []

    FilesProcessor.php:101 Unresolved

    maybe "to" instead?

    FilesProcessor.php:200 Unresolved

    Linebreak after the description.

    FilesProcessor.php:204 Unresolved

    Type hint `(array $data)`

    FilesProcessor.php:206 Unresolved

    As you added strict types we should check here by using $data !== []

    GalleryProcessor.php:344 Unresolved

    Could we add type hints here?

    GalleryProcessor.php:575 Unresolved

    Linebreak after the description.

    GalleryProcessor.php:579 Unresolved

    Type hint `(array $data)`

    GalleryProcessor.php:581 Unresolved

    As you added strict types we should check here by using $data !== []

    LanguageMenuProcessor.php:323 Unresolved

    $this->menuConfiguration['languages'] === [] && $this->menuConfiguration['languages.'] === []

    LanguageMenuProcessor.php:325 Unresolved

    $this->menuConfiguration['languages.'] !== []

    LanguageMenuProcessor.php:387 Unresolved

    Linebreak after the description.

    LanguageMenuProcessor.php:391 Unresolved

    Type hint `(array $data)`

    LanguageMenuProcessor.php:393 Unresolved

    As you added strict types we should check here by using $data !== []

    MenuProcessor.php:304 Unresolved

    Type hint for $key.

    MenuProcessor.php:317 Unresolved

    Could we make this strict here?

    MenuProcessor.php:461 Unresolved

    Type hint for $data

    MenuProcessor.php:510 Unresolved

    type hints (string $content, array $conf)

    MenuProcessor.php:523 Unresolved

    type hints (array $menuItem, array $conf)

    SiteProcessor.php:116 Unresolved

    Linebreak after the description.

    SiteProcessor.php:120 Unresolved

    Type hint `(array $data)`

    SiteProcessor.php:122 Unresolved

    As you added strict types we should check here by using $data !== []

    SplitProcessor.php:91 Unresolved

    $fieldName !== ''

    SplitProcessor.php:157 Unresolved

    Linebreak after the description.

    SplitProcessor.php:161 Unresolved

    Type hint `(array $data)`

    SplitProcessor.php:163 Unresolved

    As you added strict types we should check here by using $data !== []
  28. Jo Hasenau commented on patch set 11 10/24/19, 09:22

    > Patch Set 6: > > (2 comments) $fieldName needs === instead of !== anything else has been resolved as requested.
  29. Jo Hasenau uploaded patch set 12 10/24/19, 09:23

  30. TYPO3com voted on patch set 12 V -1 10/24/19, 09:33 Completed build in 09m 33s on Thu, 24 Oct, 09:33 AM Test Summary: 173 of 48376 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37573

  31. Oli Bartsch commented on patch set 12 10/24/19, 09:45

    > Patch Set 11: > > > Patch Set 6: > > > > (2 comments) > > $fieldName needs === instead of !== anything else has been resolved as requested. Argh! You're right.
  32. Jo Hasenau uploaded patch set 13 10/24/19, 09:48

  33. TYPO3com voted on patch set 13 V -1 10/24/19, 09:58 Completed build in 10m 17s on Thu, 24 Oct, 09:58 AM Test Summary: 227 of 48376 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37574

  34. Jo Hasenau uploaded patch set 14 10/24/19, 13:17

  35. TYPO3com voted on patch set 14 V -1 10/24/19, 13:29 Completed build in 11m 43s on Thu, 24 Oct, 01:29 PM Test Summary: 110 of 48376 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37591

  36. Jo Hasenau uploaded patch set 15 10/24/19, 14:55

  37. Jo Hasenau uploaded patch set 16 10/24/19, 14:57

  38. TYPO3com voted on patch set 15 V -1 10/24/19, 15:08 Completed build in 12m 19s on Thu, 24 Oct, 03:08 PM Test Summary: 7 of 48376 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37605

  39. TYPO3com voted on patch set 16 V -1 10/24/19, 15:14 Completed build in 14m 53s on Thu, 24 Oct, 03:14 PM Test Summary: 7 of 48376 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37606

  40. Jo Hasenau uploaded patch set 17 10/24/19, 16:16

  41. Jo Hasenau commented on patch set 17 10/24/19, 16:23

    > Patch Set 11: > > (36 comments) The array checks of the LanguageMenuProcessor have been reverted to empty(), since the parameters might not be there at all.
  42. TYPO3com voted on patch set 17 V +1 10/24/19, 16:26 Completed build in 09m 56s on Thu, 24 Oct, 04:26 PM Test Summary: 48017 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37612

  43. Jo Hasenau uploaded patch set 18 10/25/19, 13:08

  44. TYPO3com voted on patch set 18 V -1 10/25/19, 13:22 Completed build in 13m 44s on Fri, 25 Oct, 01:22 PM Test Summary: 48019 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37677

  45. Jo Hasenau uploaded patch set 19 10/25/19, 13:35

  46. TYPO3com commented on patch set 19 10/25/19, 13:56 Completed build in 16m 22s on Fri, 25 Oct, 01:56 PM Test Summary: 48019 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37682

  47. Jo Hasenau uploaded patch set 20 10/25/19, 14:14

  48. TYPO3com voted on patch set 20 V -1 10/25/19, 14:36 Completed build in 21m 32s on Fri, 25 Oct, 02:36 PM Test Summary: 1 of 7934 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37687

  49. TYPO3com commented on patch set 20 10/25/19, 14:43 Completed build in 50m 18s on Fri, 25 Oct, 02:43 PM Test Summary: 7799 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37687

  50. Jo Hasenau uploaded patch set 21 10/25/19, 15:16

  51. TYPO3com voted on patch set 21 V -1 10/25/19, 15:53 Completed build in 17m 56s on Fri, 25 Oct, 03:53 PM Test Summary: 1 of 48378 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37703

  52. TYPO3com voted on patch set 21 V +1 10/25/19, 16:00 Completed build in 43m 08s on Fri, 25 Oct, 04:00 PM Test Summary: 48019 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37703

  53. TYPO3com commented on patch set 21 10/25/19, 16:13 Completed build in 12m 30s on Fri, 25 Oct, 04:13 PM Test Summary: 48059 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37709

  54. Jo Hasenau uploaded patch set 22 10/26/19, 09:08

  55. TYPO3com voted on patch set 22 V +1 10/26/19, 09:20 Completed build in 12m 27s on Sat, 26 Oct, 09:20 AM Test Summary: 48059 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37771

  56. Jo Hasenau uploaded patch set 23 10/26/19, 09:49

  57. TYPO3com voted on patch set 23 V -1 10/26/19, 10:00 Completed build in 10m 04s on Sat, 26 Oct, 10:00 AM Test Summary: 1 of 48174 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37774

  58. TYPO3com voted on patch set 23 V +1 10/26/19, 10:22 Completed build in 09m 23s on Sat, 26 Oct, 10:22 AM Test Summary: 48067 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37777

  59. Daniel Siepmann uploaded patch set 24 10/26/19, 11:01

  60. Daniel Siepmann commented on patch set 24 10/26/19, 11:04

    I would like to have further tests beforehand. I've tried to add tests for the new FlexForm Processor. The first tests are available, but I guess we should check the API a bit more. The following patch would add the tests, but also modifies the API, so this can be used to give it a try and change the API within this Patch beforehand. https://review.typo3.org/c/Packages/TYPO3.CMS/+/62123

    AbstractDataProcessor.php:101 Unresolved

    Why do we need this instance here? This is provided by the outside when process() is called. This should also carry and provide all necessary information.

    AbstractDataProcessor.php:102 Unresolved

    I would move that to Dependency Injection. That would make writing Unit Tests easily possible.

    SplitProcessor.php:57 Unresolved

    I guess fieldname should be fieldName
  61. TYPO3com voted on patch set 24 V -1 10/26/19, 11:12 Completed build in 11m 00s on Sat, 26 Oct, 11:12 AM Test Summary: 1 of 48417 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37779

  62. Jo Hasenau commented on patch set 24 10/26/19, 11:58

    > Patch Set 24: > > (3 comments) > > I would like to have further tests beforehand. I've tried to add tests for the new FlexForm Processor. The first tests are available, but I guess we should check the API a bit more. > The following patch would add the tests, but also modifies the API, so this can be used to give it a try and change the API within this Patch beforehand. > > https://review.typo3.org/c/Packages/TYPO3.CMS/+/62123 The fallback instance will be needed when you make use methods of the class without a real data processor. i.e. the PWA guys sometimes call those processors or single methods of them outside the Fluid or TypoScript context. Still methods like stdWrap can be made accessible this way.
  63. Daniel Siepmann uploaded patch set 25 10/26/19, 12:06

  1. TYPO3com voted on patch set 25 V +1 10/26/19, 12:16 Completed build in 09m 56s on Sat, 26 Oct, 12:16 PM Test Summary: 48066 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37790

  2. Jo Hasenau uploaded patch set 26 10/26/19, 12:34

  3. TYPO3com voted on patch set 26 V -1 10/26/19, 12:44 Completed build in 09m 40s on Sat, 26 Oct, 12:44 PM Test Summary: 60 of 48426 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37791

  4. Jo Hasenau uploaded patch set 27 10/26/19, 12:54

  5. TYPO3com voted on patch set 27 V -1 10/26/19, 13:04 Completed build in 10m 03s on Sat, 26 Oct, 01:04 PM Test Summary: 1 of 48426 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37792

  6. Daniel Siepmann uploaded patch set 28 10/26/19, 15:02

  7. TYPO3com voted on patch set 28 V -1 10/26/19, 15:03 Completed build in 16s on Sat, 26 Oct, 03:03 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37793

  8. Daniel Siepmann uploaded patch set 29 10/26/19, 17:41

  9. TYPO3com voted on patch set 29 V -1 10/26/19, 17:41 Completed build in 16s on Sat, 26 Oct, 05:41 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37795

  10. Jo Hasenau marked it work in progress 10/26/19, 17:44

  11. Jo Hasenau uploaded patch set 30 10/26/19, 18:51

  12. TYPO3com voted on patch set 30 V -1 10/26/19, 19:00 Completed build in 09m 47s on Sat, 26 Oct, 07:00 PM Test Summary: 7799 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37797

  13. Jo Hasenau uploaded patch set 31 10/27/19, 08:31

  14. TYPO3com voted on patch set 31 V -1 10/27/19, 08:32 Completed build in 12s on Sun, 27 Oct, 08:32 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37798

  15. Jo Hasenau uploaded patch set 32 10/29/19, 11:21

  16. TYPO3com voted on patch set 32 V -1 10/29/19, 11:31 Completed build in 10m 02s on Tue, 29 Oct, 11:31 AM Test Summary: 12 of 48430 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37842

  17. Jo Hasenau uploaded patch set 33 10/29/19, 12:18

  18. TYPO3com voted on patch set 33 V -1 10/29/19, 12:28 Completed build in 09m 47s on Tue, 29 Oct, 12:28 PM Test Summary: 4 of 48430 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37843

  19. Jo Hasenau commented on patch set 33 02/29/20, 00:46

    > Patch Set 33: Verified-1 > > Completed build in 09m 47s on Tue, 29 Oct, 12:28 PM > Test Summary: 4 of 48430 failed > Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37843 Is there anyone still interested in this patch that has been started at the Initiative Week or should we just abandon it?
  20. Susi Moog commented on patch set 33 03/16/20, 18:21

    At the current interest rate I would say abandon for now - it's probably too big a change for the current priorities at this point.
  21. Benni Mack commented on patch set 33 08/13/20, 11:15

    DataProcessorInterface.php:21 Unresolved

    What I don't get: Why should we add a new interface which has more functionality, but also the same functionality as the existing one? We could create a second interface adding the new API, so existing third-party DataProcessors can decide on their own if they want to implement e.g. this "allowedConfigurationKeys" logic, which I'm not fully convinced to include this at all.

    AbstractDataProcessor.php:26 Unresolved

    Interface + Abstract class is usually a bad practice, which I'd like to avoid for new code. This means that if you extend from the AbstractDataProcessor, the DataProcessorInterface could be omitted, and we could check on the abstract class instead (which I'd like to avoid) on top: maybe I didn't see this, but the abstract class does not define an abstract method?

    GalleryProcessor.php:226 Unresolved

    instead of defining this during runtime, shouldn't we just define it directly as a property?
  22. Benni Mack wrote 11/29/21, 09:58

    Change destination moved from master to main
  23. Benni Mack updated the commit message in patch set 34 11/29/21, 13:19

  24. Oliver Klee wrote 02/05/22, 11:40

    Removed cc Oliver Klee.
  25. Benni Mack abandoned the change 10/19/22, 09:46

    closing this patchset now, due to lack of feedback. My last feedback was from 2020, with a prior feedback from Susi if we should abandon it.