Review main Merged

49011[TASK] Remove own implementations in AbstractViewHelper

Nicole Hummel CR +2 V +2 Normal +1 −232 updated 07/20/16, 09:23

Commit message

The own implementation of AbstractViewHelper::registerArgument and
AbstractViewHelper::overrideArgument aren't needed anymore. Both
functions of the Fluid Standalone can be used safely.

Furthermore two unused private properties are removed with this patch.

Review

  • Code review CR +2
    • Markus Klein +2
    • Claus Due +1
    • Wouter Wolters +1
  • Verified V +2
    • Markus Klein +2
    • Wouter Wolters +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 2329

Show 24 earlier messages
  1. Nicole Hummel uploaded patch set 1 07/17/16, 10:08

  2. Nicole Hummel uploaded patch set 2 07/17/16, 10:13

  3. TYPO3com voted on patch set 1 V +1 07/17/16, 10:16 Completed build in 06m 25s on Sun, 17 Jul, 12:16 PM Test Summary: 19290 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1012

  4. TYPO3com voted on patch set 2 V +1 07/17/16, 10:18 Completed build in 05m 41s on Sun, 17 Jul, 12:18 PM Test Summary: 19290 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1013

  1. Oliver Klee voted on patch set 2 CR +1 07/17/16, 14:04

  2. Claus Due commented on patch set 2 CR +1 07/17/16, 14:36

    Every last render() method argument is now gone from the core? Excellent work, everyone involved!
  3. Nicole Hummel uploaded patch set 3 07/17/16, 18:26

  4. Nicole Hummel commented on patch set 3 07/17/16, 18:27

    @Claus: As far as I saw this change is unrelated to the registration of render() function arguments. So those can still be used
  5. TYPO3com voted on patch set 3 V +1 07/17/16, 18:33 Completed build in 07m 17s on Sun, 17 Jul, 08:33 PM Test Summary: 19290 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1023

  6. Oliver Klee voted on patch set 3 CR +1 07/17/16, 19:26

  7. Claus Due commented on patch set 2 07/17/16, 21:09

    > @Claus: As far as I saw this change is unrelated to the registration of render() function arguments. So those can still be used In that case I must change the vote to -1. Note the class name of ArgumentDefinition being used - it is a CMS specific class which is necessary (it has the additional property "is render method argument" which we obviously still need if render method arguments must be supported). Removing this makes it impossible to invoke a ViewHelper which uses render method arguments, since the argument definition will not indicate that the argument needs to be passed specially. See https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php#L203 and https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/fluid/Classes/Core/ViewHelper/ArgumentDefinition.php#L34. It is extremely important that none of these supports be removed until we are 100% ready to declare render method arguments no longer supported by neither core nor third party ViewHelpers. If third party ViewHelpers must still support this (as deprecated feature perhaps) then these ArgumentDefinition etc. must remain in place.
  8. Claus Due voted on patch set 3 CR -1 V -1 07/17/16, 21:10

  9. Claus Due commented on patch set 3 07/17/16, 22:14

    Coming back to this after thinking more - it is actually possible to drop our registerArgument method since https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php#L312 takes care of that. You wouldn't be able to declare a render method argument that has no phpdoc and use registerArgument to make that work - but that would be bad practice anyway. But overrideArgument I think must stay until render method arguments are no longer supported. It might not be common knowledge but it should actually be possible to override an argument declared by a parent class' render() method, in a subclass' initializeArguments() method. Yep, I know, edge case, but since we still have our registerRenderMethodArguments it doesn't hurt much to keep our overrideArgument ;)
  10. Claus Due uploaded patch set 4 07/17/16, 22:29

  11. Nicole Hummel commented on patch set 3 07/17/16, 22:31

    @Claus: Sorry, Clause but your argumentation is not correct exactly. Both removed methods used an own implementation of the ArgumentDefinition but without the last constructor parameter. So that one isn't turned on anyway. Each usage of the method you mentioned (\TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition::isMethodParameter) is bound to that class. So there is no change in bahaviour. Before that method return false in every way, no the method isn't executed anymore. I don't see any change in behavouir here but think it is a good patch to remove further own code and stick to the fluid standalone one!
  12. Claus Due commented on patch set 4 07/17/16, 22:32

    This should be everything we can remove in AbstractViewHelper without breaking anything related to render() method arguments.
  13. Nicole Hummel commented on patch set 4 CR -1 07/17/16, 22:33

    Plase read my comment. I don't see any need for the own implementation of the overrideArgument method here!
  14. Claus Due commented on patch set 4 07/17/16, 22:34

    > Both removed methods used an own implementation of the ArgumentDefinition but without the last constructor parameter. Ah, right. This does mean overrideArgument isn't needed either. Update coming.
  15. TYPO3com voted on patch set 4 V +1 07/17/16, 22:36 Completed build in 06m 46s on Mon, 18 Jul, 12:36 AM Test Summary: 19290 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1030

  16. Claus Due uploaded patch set 5 07/17/16, 22:36

  17. Claus Due commented on patch set 5 07/17/16, 22:38

    Removed overrideArgument - along with all unit test methods that covered inherited code of standalone Fluid parent class.
  18. TYPO3com voted on patch set 5 V +1 07/17/16, 22:43 Completed build in 06m 56s on Mon, 18 Jul, 12:43 AM Test Summary: 19280 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1031

  19. Nicole Hummel commented on patch set 5 CR -1 07/17/16, 22:45

    AbstractViewHelperTest.php:265

    IMHO this one has to stay. Will push a new patch set
  20. Nicole Hummel uploaded patch set 6 07/17/16, 22:50

  21. Claus Due voted on patch set 6 CR +1 07/17/16, 22:52

  22. TYPO3com voted on patch set 6 V +1 07/17/16, 22:56 Completed build in 06m 00s on Mon, 18 Jul, 12:56 AM Test Summary: 19282 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1032

  23. Wouter Wolters voted on patch set 6 CR +1 V +1 07/20/16, 09:03

  24. Markus Klein voted on patch set 6 CR +2 V +2 07/20/16, 09:23

  25. Gerrit merged patch set 6 07/20/16, 09:23