Review main Merged

82607[TASK] Indexed Search: Use DTOs for indexing data

Andreas Kienast CR +2 V +2 Hard +300 −138 updated 01/24/24, 09:05

Commit message

Content parsers implemented in Indexed Search return a solely defined
array for the internal indexer. To streamline the data passing,
dedicated DTO classes are now introduced and used.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stephan Großberndt +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 1518

  1. Andreas Kienast uploaded patch set 1 01/24/24, 07:44

  2. core-ci voted on patch set 1 V +1 01/24/24, 07:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52055

  3. Stephan Großberndt commented on patch set 1 01/24/24, 08:15

    FileContentParser.php:461

    Could/should this info be kept somewhere?
  4. Garvin Hicking commented on patch set 1 01/24/24, 08:21

    Deprecation-102908-IndexedSearchContentParsersReturningArrays.rst:15

    "return a solely defined array for" -> "return an array solely defined for"

    Deprecation-102908-IndexedSearchContentParsersReturningArrays.rst:22

    Probably better "deprecated" to properly indicate the future removal of this?

    FileContentParser.php:526

    Maybe rename this variable to $contentObj (or $indexContent, $contentData...) or so? It's no longer an array so this might "read better"? In the other file most instances got replaced with "indexingDataDto", that could match here too?

    Indexer.php:343

    Maybe preserve that cross-reference?

    Indexer.php:900

    Can typehints for the other parameters be added too, or probably beyond the scope of this patch?

    Indexer.php:970

    Maybe this explanation can be preserved as a phpdoc method comment?
  5. Andreas Kienast commented on patch set 1 01/24/24, 08:29

    Deprecation-102908-IndexedSearchContentParsersReturningArrays.rst:15 Reply

    Acknowledged

    Deprecation-102908-IndexedSearchContentParsersReturningArrays.rst:22 Reply

    Acknowledged

    FileContentParser.php:461 Reply

    I'll re-add the phpdoc for now. IMO(!) this should be proper exceptions.

    FileContentParser.php:526 Reply

    Acknowledged

    Indexer.php:343 Reply

    We usually don't do these cross-references anymore. Also, there are some more refactorings in the pipeline.

    Indexer.php:900 Reply

    Acknowledged

    Indexer.php:970 Reply

    The comment doesn't make much sense in it's current state. It describes that all values are "not a unique array of words", but that's in fact quite the opposite the method does.
  6. Andreas Kienast uploaded patch set 2 V +1 01/24/24, 08:30

  7. Stephan Großberndt voted on patch set 2 CR +1 01/24/24, 08:32

  8. Stephan Großberndt commented on patch set 2 CR 0 01/24/24, 08:35

    Indexer.php:145

    This still says array

    Indexer.php:147

    Maybe rename this one as well?
  9. core-ci voted on patch set 2 V +1 01/24/24, 08:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52058

  10. Andreas Kienast uploaded patch set 3 V +1 01/24/24, 08:46

  11. Andreas Kienast commented on patch set 3 01/24/24, 08:46

    Indexer.php:145 Reply

    Done

    Indexer.php:147 Reply

    Done
  12. core-ci voted on patch set 3 V +1 01/24/24, 08:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52059

  13. Stephan Großberndt voted on patch set 3 CR +1 01/24/24, 08:55

  14. Garvin Hicking commented on patch set 3 CR +1 V +1 01/24/24, 09:00

    Thanks for giving this old lad some love. ;)
  15. Stefan Bürk commented on patch set 3 01/24/24, 09:04

    Indexer.php:139

    Should this not be initialized to a instance in the constructor ? Otherwise an access befor setting it (and that counts checking for existens) would fail. Or at least marked as nullable and properly handled at places ? The other point - does it really need to be public ?
  16. Benni Mack voted on patch set 3 CR +2 V +2 01/24/24, 09:04

  17. Benni Mack merged patch set 4 01/24/24, 09:04

  18. Benni Mack commented on patch set 4 01/24/24, 09:05

    Indexer.php:139 Reply

    ah, sorry, did not see the comment while submitting it. Yes, it needs to be public for the time being as the Indexer API is de-facto non-existent, I hope this gets improved in the next few patches