Review main Merged

81771[TASK] Avoid direct usages of `\PDO::PARAM_*` constants again

Stefan Bürk CR +2 V +2 Easy +10 −8 updated 11/19/23, 18:28

Commit message

Recently, the `ext:styleguide` has been integrated with full commit
history as a system extension into the mono repository.

That added code to the mono repository, which was not covered
with #98649 which modified most userland code to use

a) `Connection::PARAM_*` constants instead of `\PDO::PARAM_*` constants

This is due to also another change from Doctrine DBAL 3 [1]
which can easily be changed in TYPO3's Source Code to ensure
easy upgrade paths and showing best practices for extension
authors looking into TYPO3 Source Code

b) Avoid using constants from `\Doctrine\DBAL\Connection`
   but use our own constants.

Even though Doctrine DBAL 3.x introduces "ParameterType" objects,
we use our own connection implementation for the time being
as we also seek to backport such changes in TYPO3 v11.

c) Avoid using the Connection::PARAM_STR for ->createNamedParameter
as second argument, as this is the default value.

All of these changes will make the upgrade path towards Doctrine
DBAL 4.x easier.

This change modified the styleguide code to reflect these changes.

[1] https://github.com/doctrine/dbal/blob/3.4.x/UPGRADE.md#bc-break-the-pdo-symbols-are-no-longer-part-of-the-dbal-api

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Chris Müller +1
    • Oliver Klee +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 810

  1. Stefan Bürk uploaded patch set 1 11/19/23, 14:22

  2. core-ci voted on patch set 1 V +1 11/19/23, 14:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49097

  3. Chris Müller voted on patch set 1 CR +1 11/19/23, 14:28

  4. Stefan Bürk wrote 11/19/23, 16:18

    Topic set to doctrine-dbal
  5. Benni Mack voted on patch set 1 V +1 CR +1 11/19/23, 16:27

  6. Oliver Klee voted on patch set 1 V +1 CR +1 11/19/23, 17:26

  7. Stefan Bürk uploaded patch set 2 11/19/23, 18:17

    Copied Votes: * Code-Review+1 (copy condition: "changekind:NO_CHANGE OR is:MIN") * Verified+1 (copy condition: "changekind:NO_CHANGE")
  8. core-ci voted on patch set 2 V +1 11/19/23, 18:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49100

  9. Stefan Bürk voted on patch set 2 V +2 CR +2 11/19/23, 18:28

  10. Stefan Bürk merged patch set 3 11/19/23, 18:28