Review main Merged

85552[TASK] Replace column length comparison with schema normalization

Stefan Bürk CR +2 V +2 Normal +78 −14 updated 08/08/24, 17:53

Commit message

The doctine/dbal integration has been raised to v4 with #102875,
but still using the Doctrine DBAL v2 way for comparing columns in
the extended `Comparator`. This kept some special treatments which
needed to be applied on the Virtual Database Scheme AND on the
actual database schema representation.

This change moves the special treatment for MySQL and MariaDB
on BlobType and TextType based columns regarding length comparison
from the TYPO3 `Comparator` into the TYPO3 `ConnectionMigrator`,
performing normalization on both schema representations now.
The normalized length does not have an impact on the raw
comparison anymore with the Doctrine DBAL 4
`AbstractPlatform::columnEqual()` check.
It is still needed to allow Doctrine determine the correct type
based on that length for the column-type SQL generation.

This change is one more step towards removing the Doctrine DBAL v3
compare-handling from the `Comparator` and further changes will
be streamlined to reach removal of legacy code.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Anja Leichsenring +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Anja Leichsenring +1
    • core-ci +1 CI

Issues 2

Files 5

Review log 2029

Show 24 earlier messages
  1. Stefan Bürk uploaded patch set 1 08/07/24, 19:06

  2. Stefan Bürk updated the commit message in patch set 2 08/07/24, 19:10

  3. core-ci voted on patch set 1 V +1 08/07/24, 19:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63013

  4. core-ci voted on patch set 2 V +1 08/07/24, 19:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63014

  1. Stefan Bürk updated the commit message in patch set 3 V +1 08/07/24, 21:04

  2. core-ci voted on patch set 3 V +1 08/07/24, 21:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63016

  3. Stefan Bürk uploaded patch set 4 V +1 08/08/24, 09:34

  4. core-ci voted on patch set 4 V -1 08/08/24, 09:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63038

  5. Stefan Bürk uploaded patch set 5 V -1 08/08/24, 09:54

  6. core-ci voted on patch set 5 V +1 08/08/24, 10:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63039

  7. Stefan Bürk rebased onto patch set 6 V +1 08/08/24, 12:10

  8. core-ci voted on patch set 6 V +1 08/08/24, 12:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63044

  9. Stefan Bürk wrote 08/08/24, 12:52

    Topic set to doctrine/dbal
  10. Stefan Bürk rebased onto patch set 7 V +1 08/08/24, 17:00

  11. core-ci voted on patch set 7 V +1 08/08/24, 17:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63067

  12. Christian Kuhn uploaded patch set 8 V +1 08/08/24, 17:30

  13. core-ci voted on patch set 8 V +1 08/08/24, 17:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63068

  14. Christian Kuhn voted on patch set 8 CR +1 V +1 08/08/24, 17:36

  15. Garvin Hicking updated the commit message in patch set 9 CR +1 V +1 08/08/24, 17:40

  16. Christian Kuhn updated the commit message in patch set 10 08/08/24, 17:42

  17. Christian Kuhn updated the commit message in patch set 11 08/08/24, 17:45

  18. Garvin Hicking commented on patch set 11 CR +1 V +1 08/08/24, 17:45

    (minor feedback, advance vote)

    ConnectionMigrator.php:299

    Use constant PHP_INT_MAX instead?

    ConnectionMigrator.php:1893

    PHP_INT_MAX?
  19. Christian Kuhn voted on patch set 11 CR +1 V +1 08/08/24, 17:45

  20. Anja Leichsenring voted on patch set 11 CR +1 V +1 08/08/24, 17:46

  21. Christian Kuhn commented on patch set 11 08/08/24, 17:47

    ConnectionMigrator.php:299 Reply

    no. this is 2^31-1 ... PHP_INT_MAX is 2^32 on 32 bit h/w and 2^64 on 64 bit.

    ConnectionMigrator.php:1893 Reply

    Done
  22. Christian Kuhn commented on patch set 11 08/08/24, 17:49

    ConnectionMigrator.php:299 Reply

    actually, PHP_INT_MAX signed, but still, we want the db-length and not php-int-max here.
  23. core-ci voted on patch set 11 V +1 08/08/24, 17:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63071

  24. Christian Kuhn voted on patch set 11 CR +2 V +2 08/08/24, 17:53

  25. Christian Kuhn merged patch set 12 08/08/24, 17:53