Review main Abandoned Breaking

52636[WIP][!!!][TASK] Remove PageRepository->getRootLine string error functionality

Benni Mack CR 0 V 0 Normal +46 −44 updated 11/30/17, 15:15

Commit message

The public properties PageRepository->error_getRootLine and
PageRepository->error_getRootLine_failPid and the third parameter
within PageRepository->getRootLine() are unused and circumvent
proper information via Exception handling.

This functionality is removed, instead the Exception Handling
works as expected, which is mostly related to workspace logic now.

Review

  • Code review CR 0
  • Verified V 0

Files 3

Review log 1519

  1. Benni Mack uploaded patch set 1 04/27/17, 11:49

  2. TYPO3com voted on patch set 1 V +1 04/27/17, 11:58 Completed build in 08m 43s on Thu, 27 Apr, 01:58 PM Test Summary: 55782 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11035

  3. Benni Mack uploaded patch set 2 05/02/17, 07:32

  4. TYPO3com voted on patch set 2 V +1 05/02/17, 07:39 Completed build in 05m 58s on Tue, 2 May, 09:39 AM Test Summary: 55782 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11120

  5. Elmar Hinz voted on patch set 2 CR +1 05/02/17, 16:19

  6. Elmar Hinz uploaded patch set 3 05/02/17, 17:15

  7. Elmar Hinz uploaded patch set 4 05/02/17, 17:20

  8. TYPO3com voted on patch set 3 V +1 05/02/17, 17:21 Completed build in 05m 38s on Tue, 2 May, 07:21 PM Test Summary: 55782 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11137

  9. TYPO3com voted on patch set 4 V +1 05/02/17, 17:26 Completed build in 05m 24s on Tue, 2 May, 07:26 PM Test Summary: 55782 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-11138

  10. Elmar Hinz commented on patch set 4 CR +1 05/02/17, 18:40

    Actually the only remaining purpose of this method is, to catch the "record not found" exception of the root line utility and return an empty root line in that case. It it used throughout the front end and back end not only related to the current page. There is a need for this function that handles this special exception in this way. It is a little weird to always get the root line from the page repository and not from a root line repository (RootlineUtility). In my opinion the method is in the wrong place. It should become part of the root line repository as an handy alternative the get() method, that throws all exceptions, with a name that addresses this functionality. As a first step towards a future API this is progression.
  11. Benni Mack commented on patch set 4 05/03/17, 07:33

    exactly. :) I will add a RST file and then remove the WIP.
  12. Benni Mack commented on patch set 4 CR -1 05/04/17, 05:39

    Any reason why you did import \Exception and \RuntimeException? Also, when enforcing "int" and "string" and the return type, that only makes sense if the PHP file is in strict mode, making marking this file as breaking completely.
  13. Elmar Hinz commented on patch set 4 CR 0 05/04/17, 07:44

    1.) I removed @throws Exception from the function. IMHO the code always throws RuntimeException. Please check if this assumption is right. 2.) It's surprising that CGL cleanup didn't remove the import Exception. I should. 3.) I think the import of the RuntimeException should be O.K. 4.) Enforcing string and int makes sense without strict for reasons of documentation at least.
  14. Andreas Kienast commented on patch set 4 05/04/17, 07:46

    We don't import classes that are in the root namespace as there is no real benefit.
  15. Elmar Hinz commented on patch set 4 05/04/17, 08:06

    If that is the common style. In my opinion the only reason not to import and use full qualified names is in the case of naming conflicts. If FQN is used in that case, it's not only technically required. It's documentation. Using FQN in other cases makes my assume, there is a naming conflict in the class.
  16. Elmar Hinz commented on patch set 4 05/17/17, 11:23

    Should this be moved into #52461? Both result in throwing more exceptions from this method and need a similar breaking.rst
  17. Elmar Hinz commented on patch set 4 05/17/17, 11:25

    > Should this be moved into #52461? > > Both result in throwing more exceptions from this method and need a > similar breaking.rst Change 52636 not Forge 52461.
  18. Oliver Klee commented on patch set 4 05/17/17, 12:13

    PageRepository.php:939

    We don't need the else here as the return already exits the method.
  19. Benni Mack abandoned the change 11/30/17, 15:15

    will handle separately