Review main Merged

74655[BUGFIX] Resolve type inconsistency in ComparisonInterface

crell CR +2 V +2 Normal +30 −55 updated 07/07/22, 19:48

Commit message

ComparisonInterface's documented types and actual types are
inconsistent. This patch corrects the types to be consistent
with what the actual code does, which allows for the removal
of several PHPStan errors.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 2430

Show 35 earlier messages
  1. crell uploaded patch set 1 05/16/22, 21:26

  2. core-ci voted on patch set 1 V -1 05/16/22, 21:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27266

  3. core-ci commented on patch set 1 05/16/22, 23:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27266

  4. Stefan Bürk commented on patch set 1 05/16/22, 23:47

    Inteface changes are breaking, and for "mixed" return type it is not possible to have v11/v12 compatible code (even if it is left out) . Changing breaking interface signatures of "public" interface as backport is not a bugfix. And backporting breaking changes to LTS is not was should be done. To be honest, I just had a really first quick look - will revisit the next days. Just noting first thoughts.

    ComparisonInterface.php:80

    Not sure about this. Interface is not marked as internal, so this is is breaking. Furthermore it cannot be written v11/v12 compatible code as mixed is not possible with php7.4, which must be supported when supporting v11 core. Not sure if there are a lot of use-cases to create a class based on this interface - but as it must be considered as public. At least the, mixed return type should be shifted to be added in v13 then.
  5. Stefan Bürk voted on patch set 1 CR -1 05/16/22, 23:47

  1. crell uploaded patch set 2 06/23/22, 17:48

  2. crell commented on patch set 1 06/23/22, 17:48

    Reply

    Done

    ComparisonInterface.php:80 Reply

    Done
  3. core-ci voted on patch set 2 V +1 06/23/22, 17:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28360

  4. Oliver Hader commented on patch set 2 CR -1 06/24/22, 05:53

    Interface changes would be a breaking change -> NO back-port to released v11 branch
  5. Oliver Klee updated the commit message in patch set 3 06/24/22, 09:49

  6. Oliver Klee commented on patch set 3 06/24/22, 09:50

    Reply

    Done.
  7. Oliver Klee commented on patch set 3 06/24/22, 09:54

    Comparison.php:68

    /** * @var QueryInterface::OPERATOR_* $operator */

    Comparison.php:82

    @param QueryInterface::OPERATOR_* $operator See the PHPStan docs for details: https://phpstan.org/writing-php-code/phpdoc-types#literals-and-constants

    Comparison.php:105

    @return QueryInterface::OPERATOR_* See the PHPStan docs for details: https://phpstan.org/writing-php-code/phpdoc-types#literals-and-constants

    Comparison.php:122

    /** * @return mixed */

    ComparisonInterface.php:71

    @return QueryInterface::*
  8. core-ci voted on patch set 3 V +1 06/24/22, 09:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28380

  9. crell commented on patch set 3 06/24/22, 14:43

    Comparison.php:68 Reply

    Done

    Comparison.php:82 Reply

    Done

    Comparison.php:105 Reply

    Done

    Comparison.php:122 Reply

    Unnecessary, as the interface already has exactly that.

    ComparisonInterface.php:71 Reply

    Done
  10. crell uploaded patch set 4 06/24/22, 14:44

  11. core-ci voted on patch set 4 V -1 06/24/22, 14:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28397

  12. Oliver Klee commented on patch set 4 06/24/22, 15:49

    Comparison.php:122 Reply

    Can we please have it nonetheless? This would benefit human readers who then can scroll through the force and read it without having to interact/click with or hover over it.

    ComparisonInterface.php:73

    Ah, this needs to be QueryInterface::OPERATOR_* to be specific enough.
  13. Oliver Klee commented on patch set 4 CR -1 06/24/22, 16:16

    On it
  14. Oliver Klee uploaded patch set 5 06/24/22, 16:22

  15. Oliver Klee commented on patch set 5 06/24/22, 16:22

    Comparison.php:122 Reply

    Done

    ComparisonInterface.php:73 Reply

    Done
  16. Oliver Klee voted on patch set 5 V +1 CR +1 06/24/22, 16:26

  17. Stefan Bürk wrote 06/24/22, 16:27

    Removed reviewer Stefan Bürk.
  18. core-ci voted on patch set 5 V +1 06/24/22, 16:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28399

  19. crell commented on patch set 5 06/24/22, 16:35

    Comparison.php:124

    What does this add, when the interface already has this specified? It is wholly redundant.
  20. Oliver Klee wrote 06/24/22, 16:53

    Removed reviewer Oliver Klee with the following votes: * Verified+1 by Oliver Klee * Code-Review+1 by Oliver Klee
  21. Oliver Klee commented on patch set 5 06/24/22, 17:07

    Comparison.php:124 Reply

    Done
  22. Oliver Klee wrote 06/24/22, 17:07

    Removed cc Oliver Klee with the following votes: * Verified+1 by Oliver Klee * Code-Review+1 by Oliver Klee
  23. Christian Kuhn voted on patch set 5 V +1 CR +1 07/01/22, 19:54

  24. Stefan Bürk voted on patch set 5 V +2 CR +2 07/07/22, 19:48

  25. Stefan Bürk merged patch set 6 07/07/22, 19:48