Review main Merged

53731[TASK] Let GeneralUtility::makeInstance() throw exception on unknown class

Mathias Brodala CR +2 V +2 Easy +28 −0 updated 09/08/17, 10:14

Commit message

Review

  • Code review CR +2
    • Georg Ringer +2
    • Daniel Goerz +1
    • Christian Kuhn +1
  • Verified V +2
    • Georg Ringer +2
    • Christian Kuhn +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 2631

Show 56 earlier messages
  1. Mathias Brodala uploaded patch set 1 08/18/17, 12:53

  2. TYPO3com voted on patch set 1 V +1 08/18/17, 13:05 Completed build in 11m 53s on Fri, 18 Aug, 03:05 PM Test Summary: 57581 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13812

  3. Daniel Goerz commented on patch set 1 08/18/17, 13:51

    GeneralUtility.php:3489

    Shouldn't that be $finalClassName?
  4. Mathias Brodala commented on patch set 1 CR -1 08/18/17, 13:57

    XCLASS support is missing.

    GeneralUtility.php:3489 Reply

    Good catch, I'll post a fix.
  5. Georg Ringer commented on patch set 1 CR -1 08/18/17, 14:05

    that is a breaking change for 8.7, sorry not allowe
  6. Andreas Kienast commented on patch set 1 08/18/17, 14:21

    Georg, why is this a breaking change? If the class does not exist, you'll get a fatal error anyway.
  1. Mathias Brodala commented on patch set 1 08/18/17, 14:43

    > Georg, why is this a breaking change? If the class does not exist, > you'll get a fatal error anyway. If at all it is an un-breaking change if one executes code in a try...catch block catching either \InvalidArgumentException, \LogicException or \Exception. Before the script would fail hard, now you'd catch the error.
  2. Mathias Brodala uploaded patch set 2 08/18/17, 14:47

  3. Mathias Brodala commented on patch set 2 08/18/17, 14:51

    Fixed check for final class name.
  4. TYPO3com voted on patch set 2 V +1 08/18/17, 14:58 Completed build in 10m 55s on Fri, 18 Aug, 04:58 PM Test Summary: 57587 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13821

  5. Wolfgang Klinger voted on patch set 2 CR +1 08/21/17, 18:51

  6. Jörg Bösche voted on patch set 2 CR +1 08/21/17, 21:31

  7. Christian Kuhn voted on patch set 2 CR +1 V +1 08/22/17, 11:33

  8. Daniel Goerz voted on patch set 2 CR +1 08/22/17, 11:56

  9. Christian Kuhn commented on patch set 2 CR 0 V 0 08/22/17, 20:29

    i think the .rst file is not needed since the code would fatal anyway if no class is found. so, this is just an improvement for debugging purposes, but not really worth an 'important' change log fil.
  10. Christian Kuhn uploaded patch set 3 08/22/17, 20:30

  11. TYPO3com voted on patch set 3 V -1 08/22/17, 20:31 Completed build in 12s on Tue, 22 Aug, 10:31 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13953

  12. Christian Kuhn uploaded patch set 4 08/22/17, 20:31

  13. Christian Kuhn voted on patch set 4 CR +1 V +1 08/22/17, 20:32

  14. Daniel Goerz voted on patch set 4 CR +1 08/22/17, 20:40

  15. TYPO3com voted on patch set 4 V -1 08/22/17, 20:43 Completed build in 11m 57s on Tue, 22 Aug, 10:43 PM Test Summary: 1 of 58093 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13954

  16. Mathias Brodala commented on patch set 4 08/23/17, 07:14

    > i think the .rst file is not needed since the code would fatal > anyway if no class is found. so, this is just an improvement for > debugging purposes, but not really worth an 'important' change log > fil. It is useful for the edge case mentioned above, thus the Important RST is useful IMO.
  17. Mathias Brodala commented on patch set 4 08/23/17, 07:15

    > Completed build in 11m 57s on Tue, 22 Aug, 10:43 PM > Test Summary: 1 of 58093 failed > Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13954 Unrelated acceptance test failure, can someone re-trigger?
  18. TYPO3com voted on patch set 4 V +1 08/23/17, 07:28 Completed build in 11h 09m 17s on Wed, 23 Aug, 09:28 AM Test Summary: 57730 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13954

  19. Georg Ringer voted on patch set 4 CR +2 V +2 08/23/17, 17:24

  20. Gerrit merged patch set 4 08/23/17, 17:24

  21. Georg Ringer commented on patch set 5 08/23/17, 17:24

    Cherry Picked This patchset was cherry picked to branch TYPO3_8-7 as commit eb6769a60df1a62e80d17c8a1a44247ddb1cb7f9
  22. Helmut Hummel commented on patch set 5 09/02/17, 14:37

    post -1 on this one here. I simply don't understand how instantiating a non existing class is *NOT* an exception on PHP >=7 And since this is only merged to branches that have PHP 7 as minimum requirement, I don't understand the need for this change.
  23. Andreas Kienast commented on patch set 5 09/02/17, 14:54

    iirc, PHP still "throws" a fatal error only, but not an exception.
  24. Helmut Hummel commented on patch set 5 09/02/17, 15:03

    PHP throws an \Error which implements \Throwable \Throwable is handled by our exception handler With this change an \Exception is thrown which also implements \Throwable This means the added code by this patch does basically nothing (on PHP 7), except that it converts a PHP \Error to an \Exception, which adds no value, but can be misleading (as pointed out already code that is catching \Exception will now also catch \Error)
  25. Christian Kuhn commented on patch set 5 09/08/17, 10:14

    Reverted This patchset was reverted in change: I6cc32da6c0620cb0d717c930d10fa4338d6cefac