Review main Merged Breaking

82665[!!!][TASK] Make Indexed Search a CType

Benni Mack CR +2 V +2 Hard +415 −9 updated 01/29/24, 22:10

Commit message

This change moves indexed search to the proper
CType level in order to avoid using 'list'
for plugins as well, similar to felogin.

An upgrade wizard is in place, migrating
existing records as well as corresponding
backend user group permissions.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Stefan Bürk +1
    • Nikita Hovratov +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Stefan Bürk +1
    • Nikita Hovratov +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 11

Review log 1826

Show 1 earlier messages
  1. Benni Mack uploaded patch set 1 01/27/24, 00:53

  1. core-ci voted on patch set 1 V -1 01/27/24, 00:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52278

  2. Oli Bartsch uploaded patch set 2 V -1 01/29/24, 15:26

  3. core-ci voted on patch set 2 V -1 01/29/24, 15:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52433

  4. Oli Bartsch uploaded patch set 3 V -1 01/29/24, 15:38

  5. core-ci voted on patch set 3 V -1 01/29/24, 15:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52434

  6. Oli Bartsch uploaded patch set 4 V -1 01/29/24, 17:24

  7. core-ci voted on patch set 4 V -1 01/29/24, 17:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52449

  8. Oli Bartsch uploaded patch set 5 V -1 01/29/24, 17:53

  9. core-ci voted on patch set 5 V -1 01/29/24, 17:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52450

  10. Oli Bartsch uploaded patch set 6 V -1 01/29/24, 18:02

  11. core-ci voted on patch set 6 V +1 01/29/24, 18:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52451

  12. Stefan Bürk commented on patch set 6 01/29/24, 18:33

    IndexedSearchCTypeMigration.php:129

    array spread operator superflous - just use the fields directly.

    IndexedSearchCTypeMigration.php:134

    array spread operator superflous - just use the fields directly.

    IndexedSearchCTypeMigration.php:158

    Using quote for the like syntax is not a good way. This should be used with `createNamedParameter()` and a `escapeLikeWildcards()` https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Database/QueryBuilder/Index.html#escapelikewildcards So, I would suggest to use here: ```php $queryBuilder->expr()->like( 'explicit_allowdeny', $queryBuilder->createNamedParameter( '%'. $queryBuilder->escapeLikeWildcards( 'tt_content:list_type:indexedsearch_pi2' ) . '%' ) ), ``` Note: line break only related for gettir comment.

    IndexedSearchCTypeMigration.php:166

    Can't we inject the connection pool in the constructor ?

    IndexedSearchCTypeMigration.php:208

    Isn't this method unused ? TBH this is not "cross-dbmns" safe - as `"` is not the identifier quoting for all database platforms. @see https://github.com/TYPO3/typo3/blob/0d516c851584e58d8ea5ad3e25c7663a5a79186f/typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php#L1925-L1928 ``` private function trimIdentifierQuotes(string $identifier): string { return str_replace(['`', '"', '[', ']'], '', $identifier); } ```
  13. Oli Bartsch uploaded patch set 7 V +1 01/29/24, 19:52

  14. Oli Bartsch commented on patch set 7 01/29/24, 19:52

    IndexedSearchCTypeMigration.php:129 Reply

    Done

    IndexedSearchCTypeMigration.php:134 Reply

    Done

    IndexedSearchCTypeMigration.php:158 Reply

    Done

    IndexedSearchCTypeMigration.php:166 Reply

    Done

    IndexedSearchCTypeMigration.php:208 Reply

    Done
  15. core-ci voted on patch set 7 V +1 01/29/24, 19:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52462

  16. Benni Mack voted on patch set 7 CR +1 01/29/24, 20:47

  17. Nikita Hovratov uploaded patch set 8 CR +1 V +1 01/29/24, 20:59

  18. Stefan Bürk voted on patch set 8 CR +1 V +1 01/29/24, 21:02

  19. Stefan Bürk commented on patch set 8 01/29/24, 21:03

    thanks for taking care and nikita for the further findings.
  20. core-ci voted on patch set 8 V +1 01/29/24, 21:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52465

  21. Nikita Hovratov commented on patch set 8 CR +1 V +1 01/29/24, 21:08

    Just as side note: The Content Element "General Plugin (CType: list)" is now unused with this patch, as it has no list_type entries anymore. We should consider adding a logic, which hides this element from the wizard and type select if it has no entries. Someday we can hopefully remove it completely.
  22. Benni Mack voted on patch set 8 CR +1 V +1 01/29/24, 21:31

  23. Oli Bartsch voted on patch set 8 CR +2 V +2 01/29/24, 21:46

  24. Oli Bartsch merged patch set 9 01/29/24, 21:46

  25. Oli Bartsch commented on patch set 9 01/29/24, 22:10