Review main Merged

71417[BUGFIX] Do not use static closures in ServerResponseCheck

Torben Hansen CR +2 V +2 Easy +2 −3 updated 10/03/21, 05:20

Commit message

Static closures can not be used in ServerResponseCheck,
since they break the call to the closure in FileDeclaration.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Helmut Hummel +2
    • Simon Gilli +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Helmut Hummel +2
    • Simon Gilli +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 810

  1. Torben Hansen uploaded patch set 1 10/02/21, 12:46

  2. core-ci voted on patch set 1 V -1 10/02/21, 12:49 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17485

  3. Oliver Hader uploaded patch set 2 10/02/21, 13:48

  4. core-ci voted on patch set 2 V +1 10/02/21, 14:06 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17490

  5. Helmut Hummel voted on patch set 2 V +2 CR +2 10/02/21, 14:43

  6. Simon Gilli voted on patch set 2 V +1 CR +1 10/02/21, 16:52

  7. Benjamin Franzke voted on patch set 2 V +2 CR +2 10/02/21, 17:01

  8. Benjamin Franzke merged patch set 3 10/02/21, 17:01

  9. Nikita Hovratov commented on patch set 3 10/02/21, 18:16

    We could also call the closure like this: $result = ($this->handler)($response); It is not necessary and in this case not needed to provide the context. This way we could keep the php-cs-fixer rule. What do you think?
  10. Torben Hansen commented on patch set 3 10/03/21, 05:20

    Reply

    Thanks, that works perfectly and I did not know, that the call can be replaced as you suggested. Lets change it back to a static closure, re-add the php-cs-fixer rule and fix the call in FileDeclaration as suggested.