Review main Merged Breaking

79874[!!!][TASK] Introduce capabilities bit set

Alexander Schnitzler CR +2 V +2 Hard +199 −91 updated 07/08/23, 11:25

Commit message

Instead of managing the capabilities bit value as
integer property on the drivers and resource storage,
they are now represented as decicated BitSet class.

All capabilities constants of ResourceStorageInterface
have been moved into the Capabilities BitSet class.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oliver Klee +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 10

Review log 1418

  1. Alexander Schnitzler uploaded patch set 1 07/07/23, 11:39

  2. core-ci voted on patch set 1 V -1 07/07/23, 11:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43895

  3. Alexander Schnitzler uploaded patch set 2 V -1 07/07/23, 13:31

  4. core-ci voted on patch set 2 V +1 07/07/23, 13:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43913

  5. Alexander Schnitzler uploaded patch set 3 V +1 07/07/23, 14:04

  6. Alexander Schnitzler wrote 07/07/23, 14:05

    Topic set to FAL
  7. core-ci voted on patch set 3 V +1 07/07/23, 14:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43919

  8. Alexander Schnitzler marked it ready for review 07/07/23, 14:17

  9. Oliver Klee commented on patch set 3 07/07/23, 14:22

    Capabilities.php:43

    We probably can use `@param` here instead of `@phpstan-param` as IDEs like PhpStorm then would fall back on the native type declaration. Ditto for `hasCapability`.

    Capabilities.php:45

    We can add `@return $this` here to let readers and PHPStan know that the same instance is returned, and not only an instance of this class. Ditto for `addCapabilities`.

    Capabilities.php:51

    @param self::CAPABILITY_* $capabilities

    AbstractDriver.php:32

    Do we need to adapt this description?

    AbstractDriver.php:106

    We probably can use `@param` here instead, too. Also, we can use the short class name, I think.
  10. Benni Mack commented on patch set 3 07/07/23, 14:26

    ResourceStorage.php:244

    great patch. One remark. Can we move this to a fromStorageRecord() factory method?
  11. Alexander Schnitzler uploaded patch set 4 V +1 07/07/23, 14:55

  12. Alexander Schnitzler commented on patch set 4 07/07/23, 14:55

    Capabilities.php:43 Reply

    Ack

    Capabilities.php:45 Reply

    Ack

    Capabilities.php:51 Reply

    Ack

    AbstractDriver.php:32 Reply

    Ack

    AbstractDriver.php:106 Reply

    Ack

    ResourceStorage.php:244 Reply

    Well, that's not possible, because we are in the constructor of the ResourceStorage and we don't have a final object here yet. We could implement a factory method based on the incoming `$storageRecord` variable but that's an array and a bit wishy-washy, don't you think?
  13. Oliver Klee voted on patch set 4 CR +1 07/07/23, 14:59

  14. core-ci voted on patch set 4 V +1 07/07/23, 15:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43921

  15. Benni Mack commented on patch set 4 07/07/23, 15:28

    ResourceStorage.php:244 Reply

    oh no. I thought of having a factory method in the capabilities class
  16. Oliver Klee voted on patch set 4 V +1 07/07/23, 16:10

  17. Benni Mack commented on patch set 4 V +2 CR +2 07/08/23, 11:25

    ResourceStorage.php:244 Reply

    Done
  18. Benni Mack merged patch set 5 07/08/23, 11:25