Review main Abandoned Breaking

55159[!!!][TASK] Method getIndpEnv must throw exception for invalid arguments

Georg Ringer CR 0 V 0 Normal +57 −0 updated 03/17/18, 18:28

Commit message

If an invalid argument is used for the method GeneralUtility::getIndpEnv,
an exception must be thrown to be able to detect wrong usage.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 3

Review log 2732

Show 57 earlier messages
  1. Georg Ringer uploaded patch set 1 12/19/17, 13:20

  2. TYPO3com voted on patch set 1 V -1 12/19/17, 13:20 Completed build in 10s on Tue, 19 Dec, 02:20 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17889

  3. Georg Ringer uploaded patch set 2 12/19/17, 13:29

  4. Oliver Klee voted on patch set 2 CR +1 12/19/17, 13:30

  5. Mathias Brodala commented on patch set 3 12/19/17, 13:34

    Published edit on patch set 2.
  6. Mathias Brodala voted on patch set 3 CR +1 12/19/17, 13:34

  7. TYPO3com voted on patch set 2 V +1 12/19/17, 13:39 Completed build in 10m 01s on Tue, 19 Dec, 02:39 PM Test Summary: 29978 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17890

  1. Oliver Klee voted on patch set 3 CR +1 12/19/17, 13:42

  2. TYPO3com voted on patch set 3 V +1 12/19/17, 13:44 Completed build in 09m 30s on Tue, 19 Dec, 02:44 PM Test Summary: 29978 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17892

  3. Henning Liebe commented on patch set 4 12/19/17, 14:06

    Published edit on patch set 3.
  4. Henning Liebe commented on patch set 4 12/19/17, 14:07

    just changed SOMET"H"HING
  5. Mathias Brodala commented on patch set 4 12/19/17, 14:08

    > just changed SOMET"H"HING I think this was intentional to ensure that this test doesn't break if TYPO3 handles "SOMETHING" in the future. ;-)
  6. Mathias Brodala voted on patch set 4 CR +1 12/19/17, 14:08

  7. TYPO3com voted on patch set 4 V +1 12/19/17, 14:13 Completed build in 06m 57s on Tue, 19 Dec, 03:13 PM Test Summary: 29984 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17895

  8. Oliver Klee voted on patch set 4 CR +1 12/19/17, 15:59

  9. Tymoteusz Motylewski voted on patch set 4 V +1 CR +1 12/19/17, 16:08

  10. Andreas Kienast commented on patch set 4 CR -1 12/19/17, 17:33

    On it, will add a rst file
  11. Andreas Kienast uploaded patch set 5 12/19/17, 17:44

  12. TYPO3com voted on patch set 5 V +1 12/19/17, 17:51 Completed build in 06m 31s on Tue, 19 Dec, 06:51 PM Test Summary: 29984 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17904

  13. Andreas Kienast voted on patch set 5 V +1 CR +1 12/19/17, 17:53

  14. Oliver Klee voted on patch set 5 CR +1 12/19/17, 18:13

  15. Anja Leichsenring voted on patch set 5 V +1 CR +1 12/19/17, 21:09

  16. Henning Liebe voted on patch set 5 V +1 CR +1 12/20/17, 06:42

  17. Mathias Brodala voted on patch set 5 CR +1 12/20/17, 07:16

  18. Jörg Bösche voted on patch set 5 V +1 CR +1 12/20/17, 09:53

  19. Markus Klein commented on patch set 5 12/20/17, 13:53

    GeneralUtility.php:2821

    InvalidArgumentException would be more suited IMO

    GeneralUtility.php:2821

    InvalidArgumentException would be more suited IMO

    GeneralUtility.php:2821

    Why not using a simple string concatination instead of sprintf??

    GeneralUtility.php:2821

    Why not using a simple string concatination instead of sprintf??
  20. Mathias Brodala commented on patch set 5 12/20/17, 14:07

    GeneralUtility.php:2821 Reply

    Personally I always prefer (s)printf to keep the message readable and values separated but that's a matter of personal taste. In any case the string cast could be dropped since it'll occur anyways.
  21. Andreas Kienast commented on patch set 5 12/20/17, 15:30

    GeneralUtility.php:2821 Reply

    I had InvalidArgumentException also in mind, but that wouldn't be consistent with the rest of this method.
  22. Benni Mack commented on patch set 5 CR -2 12/21/17, 15:15

    I think this qualifies for a feature toggle. We add this patch https://review.typo3.org/#/c/54529/ And then add a feature toggle called "throwExceptions". I have like 10 other places where we should throw exceptions instead of returning a string (in BE_USER) where we could benefit from this feature as well. This way, this patch would turn into a non-breaking feature instead of breaking task.
  23. Tymoteusz Motylewski commented on patch set 5 12/21/17, 16:02

    @Benni, do you propose to keep current behaviour as the default one? I see a benefit of having this feature switch only if we make it deprecated from start, and remove it in v10.
  24. Benni Mack commented on patch set 5 12/21/17, 16:34

    feature is turned on for new installations, but not for updates (= improving the BC promise). If turned of, it could throw deprecations, and then we'll drop the "feature toggle" again in v10.0 of course
  25. Georg Ringer abandoned the change 03/17/18, 18:28

    rejected as whole method will change anyway using request object