Review main Merged

65640[TASK] Make Argument and Arguments classes dependency free

Alexander Schnitzler CR +2 V +2 Normal +66 −168 updated 10/08/20, 10:58

Commit message

Classes Argument and Arguments are prototypes (stateful) which
have been created by the object manager to have dependencies
injected. This however is problematic for various reasons:

1) ObjectManager shouldn't be injected into classes as it's
   used to fetch objects (with DI support) directly from the
   container.
2) In those classes, prototypes had been injected which are now
   created directly via makeInstance.

To be able to achieve this, the property mapper had been pulled
out of the Argument class and does not longer manipulate the
internal value on a setValue call. The proper value is now set
from outside the Argument instances in the ActionController.

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Benni Mack +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 6

Review log 2229

Show 24 earlier messages
  1. Alexander Schnitzler uploaded patch set 1 09/08/20, 15:49

  2. TYPO3com voted on patch set 1 V -1 09/08/20, 16:01 Completed build in 11m 49s on Tue, 8 Sep, 04:01 PM Test Summary: 174 of 73658 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5373

  3. Alexander Schnitzler uploaded patch set 2 09/08/20, 16:17

  4. TYPO3com voted on patch set 2 V +1 09/08/20, 16:29 Completed build in 11m 41s on Tue, 8 Sep, 04:28 PM Test Summary: 73149 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5374

  1. Alexander Schnitzler wrote 09/08/20, 18:16

    Topic set to extbase
  2. Alexander Schnitzler commented on patch set 2 CR -1 09/08/20, 18:38

    Argument.php:112 Unresolved

    use makeInstance here to enable xclassing

    Argument.php:313 Unresolved

    remove this
  3. Alexander Schnitzler updated the commit message in patch set 3 09/09/20, 09:01

  4. Alexander Schnitzler uploaded patch set 4 09/09/20, 09:13

  5. TYPO3com voted on patch set 3 V +1 09/09/20, 09:17 Completed build in 14m 35s on Wed, 9 Sep, 09:17 AM Test Summary: 73149 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5392

  6. TYPO3com voted on patch set 4 V +1 09/09/20, 09:25 Completed build in 11m 51s on Wed, 9 Sep, 09:25 AM Test Summary: 73149 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5393

  7. Alexander Schnitzler commented on patch set 4 09/23/20, 11:00

    ping
  8. Oliver Klee updated the commit message in patch set 5 09/23/20, 13:23

  9. Oliver Klee commented on patch set 5 09/23/20, 13:25

    ActionController.php:963

    Should we add @param mixed $rawValue to make it explicit that any type is allowed?
  10. TYPO3com voted on patch set 5 V +1 09/23/20, 13:35 Completed build in 12m 00s on Wed, 23 Sep, 01:35 PM Test Summary: 73658 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5860

  11. Benni Mack commented on patch set 5 CR +1 09/28/20, 08:10

    nice one. testing will follow
  12. Alexander Schnitzler commented on patch set 5 10/06/20, 10:59

    ActionController.php:963 Reply

    Contrary to "any type is allowed", what is your expectation if there is no type hint at all? Or what additional information does that annotation bring? Asking out of curiosity as I interpret variables without type hints as mixed anyway.
  13. Oliver Klee commented on patch set 5 10/06/20, 12:36

    ActionController.php:963 Reply

    The difference is for the reader: If the type is annotated as "mixed", I know that I can pass any type, and that the code explicitly communicates this. If there is no annotation, this reads as "we do not provide any information about the restrictions", i.e., I don't know whether I can pass any type or whether there are any (undocumented) restrictions like int|string|null or something. Also, as a reader, I cannot differentiate between "any type is okay, and this is by design" and "we have forgotten the annotation".
  14. Alexander Schnitzler commented on patch set 5 10/07/20, 10:44

    ActionController.php:963 Reply

    Ok, fine. Will add the type hint.
  15. Alexander Schnitzler uploaded patch set 6 10/07/20, 10:46

  16. Alexander Schnitzler commented on patch set 6 10/07/20, 10:47

    ActionController.php:963 Reply

    type hint added although this is a private method and user shouldn't even care about what to put into here. ;)
  17. Oliver Klee commented on patch set 6 10/07/20, 10:49

    Thanks! <3
  18. TYPO3com voted on patch set 6 V +1 10/07/20, 11:09 Completed build in 14m 02s on Wed, 7 Oct, 11:09 AM Test Summary: 73764 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6318

  19. Stefan Froemken commented on patch set 6 CR -1 10/07/20, 18:06

    ActionController.php:970

    Why do you not allow overwriting the value with null anymore?
  20. Alexander Schnitzler uploaded patch set 7 10/08/20, 09:50

  21. Alexander Schnitzler commented on patch set 7 10/08/20, 09:50

    ActionController.php:970 Reply

    Good catch!
  22. TYPO3com voted on patch set 7 V +1 10/08/20, 10:01 Completed build in 11m 39s on Thu, 8 Oct, 10:01 AM Test Summary: 73764 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6355

  23. Benni Mack voted on patch set 7 V +1 CR +1 10/08/20, 10:27

  24. Daniel Goerz voted on patch set 7 V +2 CR +2 10/08/20, 10:58

  25. Daniel Goerz merged patch set 8 10/08/20, 10:58