Review main Merged

63111[TASK] Check methods in RenderingContext before calling

Claus Due CR +2 V +2 Normal +78 −26 updated 06/09/20, 14:22

Commit message

Checks for method presence before attempting to call
them, and exposes getControllerName/getControllerAction
for public usage.

Review

  • Code review CR +2 Done
    • Claus Due +2
    • Kevin Appelt +1
    • Manuel Selbach +1
  • Verified V +2 Done
    • Claus Due +2
    • Kevin Appelt +1
    • Manuel Selbach +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 2435

Show 510 earlier messages
  1. Claus Due uploaded patch set 1 01/31/20, 19:44

  2. TYPO3com voted on patch set 1 V -1 01/31/20, 19:58 Completed build in 13m 54s on Fri, 31 Jan, 07:58 PM Test Summary: 36 of 71632 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40443

  3. Claus Due uploaded patch set 2 02/01/20, 11:10

  4. TYPO3com voted on patch set 2 V +1 02/01/20, 11:20 Completed build in 09m 30s on Sat, 1 Feb, 11:20 AM Test Summary: 71182 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40448

  5. Claus Due uploaded patch set 3 02/02/20, 12:35

  6. TYPO3com voted on patch set 3 V -1 02/02/20, 12:45 Completed build in 09m 52s on Sun, 2 Feb, 12:45 PM Test Summary: 71247 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40473

  7. Claus Due uploaded patch set 4 02/02/20, 13:00

  8. Claus Due uploaded patch set 5 02/02/20, 13:04

  9. TYPO3com voted on patch set 4 V +1 02/02/20, 13:10 Completed build in 09m 57s on Sun, 2 Feb, 01:10 PM Test Summary: 71247 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40474

  10. TYPO3com voted on patch set 5 V -1 02/02/20, 13:13 Completed build in 09m 49s on Sun, 2 Feb, 01:13 PM Test Summary: 70945 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40475

  1. TYPO3com voted on patch set 5 V +1 02/02/20, 17:34 Completed build in 09m 42s on Sun, 2 Feb, 05:34 PM Test Summary: 71247 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40484

  2. Anja Leichsenring voted on patch set 5 CR +1 02/13/20, 11:18

  3. Tymoteusz Motylewski commented on patch set 5 02/16/20, 19:21

    RenderingContextTest.php:119

    Isnt this test become useless after removing this assertion?
  4. Claus Due commented on patch set 5 02/17/20, 20:58

    RenderingContextTest.php:119 Reply

    Just to repeat the answer from slack here: There are actually two assertions that the controller action is transferred to the $request contained within ControllerContext - otherwise the test would fail/warn with "Test makes no assertions". The root of the problem seems to be that the generated mock returns FALSE for if($this->controllerContext) and then returns the value of $this->controllerAction - and I don't know why it does that. Both $this->controllerContext and $this->controllerAction are protected and should be equally accessible in the mock... The exact same check is used in method setControllerAction and as the test asserts, that method does return TRUE for the check. Otherwise the test would fail.
  5. Claus Due uploaded patch set 6 02/17/20, 21:47

  6. Claus Due uploaded patch set 7 02/17/20, 21:58

  7. TYPO3com voted on patch set 6 V +1 02/17/20, 22:03 Completed build in 15m 50s on Mon, 17 Feb, 10:03 PM Test Summary: 71332 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-227

  8. Manuel Selbach voted on patch set 7 CR +1 02/17/20, 22:08

  9. TYPO3com voted on patch set 7 V +1 02/17/20, 22:23 Completed build in 17m 11s on Mon, 17 Feb, 10:23 PM Test Summary: 71332 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-228

  10. Manuel Selbach voted on patch set 7 V +1 02/17/20, 22:48

  11. Daniel Goerz voted on patch set 7 CR +1 02/19/20, 08:54

  12. Georg Ringer voted on patch set 7 CR +1 02/19/20, 13:19

  13. Kevin Appelt voted on patch set 7 V +1 CR +1 02/20/20, 22:29

  14. Claus Due rebased onto patch set 8 02/21/20, 12:26

  15. Claus Due commented on patch set 8 02/21/20, 12:52

    RenderingContextTest.php:119 Reply

    Done
  16. TYPO3com voted on patch set 8 V -1 02/21/20, 13:27 Completed build in 44m 57s on Fri, 21 Feb, 01:27 PM Test Summary: 1 of 71920 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-395

  17. TYPO3com voted on patch set 8 V +1 02/21/20, 14:22 Completed build in 2h 25m 06s on Fri, 21 Feb, 02:22 PM Test Summary: 71464 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-395

  18. Manuel Selbach voted on patch set 8 V +1 CR +1 02/21/20, 16:46

  19. TYPO3com commented on patch set 8 02/21/20, 16:52 Completed build in 1h 16m 51s on Fri, 21 Feb, 04:52 PM Test Summary: 71464 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-415

  20. Kevin Appelt voted on patch set 8 V +1 CR +1 02/21/20, 17:05

  21. Claus Due voted on patch set 8 V +2 CR +2 02/21/20, 17:06

  22. Claus Due merged patch set 9 02/21/20, 17:06

  23. Alexander Schnitzler commented on patch set 9 02/22/20, 10:08

    RenderingContext.php:75

    Post -1: > Class TYPO3Fluid\Fluid\Core\Parser\TemplateParser does not have a constructor and must be instantiated without any parameters

    RenderingContext.php:110

    Post -1 > Call to an undefined static method TYPO3Fluid\Fluid\Core\Rendering\RenderingContext::getParserConfiguration()
  24. Claus Due commented on patch set 9 02/22/20, 10:20

    RenderingContext.php:75 Reply Unresolved

    Sounds like a false positive: on Fluid 3.0 this class does take a parameter but on 2.x it does not (yet allows instancing with an argument).

    RenderingContext.php:110 Reply Unresolved

    Method exists only on Fluid 3.0 and the `getParserConfiguration` method is only called there. This should probably be silenced/ignored in phpstan.
  25. Claus Due commented on patch set 9 06/09/20, 14:22

    For anyone tempted to do the backporting: This patch is *intentionally* not yet backported. The agreement with Benni was to allow Fluid 3.0 to be thoroughly tested before backporting this patch to earlier versions. Please do not backport yet!