Project

General

Profile

Actions

Epic #73121

closed

Render() method arguments should be moved to initializeArguments()

Added by Claus Due about 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2016-07-01
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Sprint Focus:

Description

To prevent any errors with PHP7 and subclassed ViewHelpers if/when render() method signatures change. Moving the argument registrations away from the render() method means the render() method signature will never change, making it safe to subclass. Medium complexity due to size of code base needing changes.


Subtasks 54 (0 open54 closed)

Task #76907: Move method arguments to initializeArguments() in ext:belogClosedWouter Wolters2016-07-01

Actions
Task #76909: Move method arguments to initializeArguments() in ext:beuserClosedWouter Wolters2016-07-01

Actions
Task #76911: Move method arguments to initializeArguments() in ext:frontendRejected2016-07-01

Actions
Task #76912: Move method arguments to initializeArguments() in ext:installClosed2016-07-01

Actions
Task #76913: Move method arguments to initializeArguments() in ext:extensionmanagerClosed2016-07-01

Actions
Task #76914: Move method arguments to initializeArguments() in ext:fluidClosed2016-07-09

Actions
Task #76999: TestViewHelper: Move method arguments to initializeArguments() in ext:fluid ClosedAnna Färber2016-07-09

Actions
Task #77000: HtmlentitiesViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedAnna Färber2016-07-09

Actions
Task #77002: UrlencodeViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedIvaylo Ivanov2016-07-10

Actions
Task #77004: FlashMessagesViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-10

Actions
Task #77003: TestViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedIvaylo Ivanov2016-07-10

Actions
Task #77005: CaseViewHelperTest: Move method arguments to initializeArguments() in ext:fluidClosedAnna Färber2016-07-10

Actions
Task #77006: TypolinkViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-10

Actions
Task #77010: ResourceViewHelperClosedRoberto Torresani2016-07-10

Actions
Task #77012: EmailViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-10

Actions
Task #77013: ActionViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-10

Actions
Task #77007: HtmlentitiesDecodeViewHelperTest: Move method arguments to initializeArguments() in ext:fluidClosedNicole Cordes2016-07-10

Actions
Bug #77008: StripTagsViewHelperTest: Move method arguments to initializeArguments() in ext:fluidClosedIvaylo Ivanov2016-07-10

Actions
Task #77009: DateViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedAnna Färber2016-07-10

Actions
Task #77011: DateViewHelperTest: Move method arguments to initializeArguments() in ext:fluidRejected2016-07-10

Actions
Task #77023: RadioViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-11

Actions
Task #77014: ExternalViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-10

Actions
Task #77015: PageViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-10

Actions
Task #77016: ImageViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedNicole Cordes2016-07-10

Actions
Task #77017: ValidationResultsViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-10

Actions
Task #77018: ButtonViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-10

Actions
Task #77026: Introduce helper method to set arguments for viewhelper test casesClosedAnja Leichsenring2016-07-11

Actions
Task #77032: TextfieldViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-11

Actions
Task #77036: CheckboxViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-11

Actions
Task #77038: CropViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-11

Actions
Task #77039: DateViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-11

Actions
Task #77046: BytesViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedIvaylo Ivanov2016-07-11

Actions
Task #77047: NumberViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-11

Actions
Task #77056: CurrencyViewHelper: ClosedNicole Cordes2016-07-12

Actions
Task #77063: UrlencodeViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-12

Actions
Task #77064: Nl2brViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-12

Actions
Task #77065: FormViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedNicole Cordes2016-07-12

Actions
Task #77124: UriViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-16

Actions
Task #77125: LinkViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-16

Actions
Task #77126: PaginateViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-16

Actions
Task #77127: TranslateViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-16

Actions
Task #77128: CshViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-16

Actions
Task #77129: TableListViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-16

Actions
Task #77130: PageRendererViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-16

Actions
Task #77132: ActionMenuItemGroupViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-16

Actions
Task #77133: ActionMenuItemViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-16

Actions
Task #77131: ActionMenuViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-16

Actions
Task #77139: ContainerViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedNicole Cordes2016-07-17

Actions
Task #77140: InfoboxViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedNicole Cordes2016-07-17

Actions
Task #77141: DebugViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-17

Actions
Task #77142: MediaViewHelper: Move method arguments to initializeArguments() in ext:fluidClosedRoberto Torresani2016-07-17

Actions
Task #76915: Move method arguments to initializeArguments() in ext:indexed_search and ext:filelistClosed2016-07-01

Actions
Task #76916: Move method arguments to initializeArguments() in several sysextsClosed2016-07-01

Actions
Bug #77529: Move missing method arguments to initializeArguments() in ext:fluidClosedNicole Cordes2016-08-17

Actions

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #63083: Streamline Arguments in link and uri typolink ViewhelperClosed2014-11-19

Actions
Actions #1

Updated by Claus Due about 8 years ago

  • Category set to Fluid
Actions #2

Updated by Helmut Hummel about 8 years ago

  • Status changed from New to Needs Feedback

Imho subclassing view helpers is an anti pattern.

VHs should not be open for subclassing and should be considered final.

If we have shared functionality, this should be encapsuled in a classed and composition should be used in the VHs in question to pull this functionality in.
See ImageViewHelper as an example.

Actions #3

Updated by Helmut Hummel about 8 years ago

To be clear: I would support to introduce the requirement to use `initializeArguments()` but for other reasons:

We can add the render method and the initializeArguments methods to the interface with the following benefits:

  • Clearer API (only one style to do things)
  • It is a much clearer contract for VH authors
  • It reduces runtime magic resoliving
Actions #4

Updated by Helmut Hummel about 8 years ago

To make this reality the following things need to be done:

  1. Change all core VHs
  2. Deprecate render methods with arguments (with target for removal in 9)
Actions #5

Updated by Claus Due about 8 years ago

There are other benefits than being able to subclass the ViewHelpers. For example, avoiding the reflection framework and becoming a better Fluid citizen (not requiring special execution handling to support render method arguments).

As such, the topic of this discussion should not be "should be allow subclassing ViewHelpers" but rather "should we move argument registrations to avoid reflection and executions only supported on TYPO3 CMS". Whether or not we should even allow subclassing ViewHelpers should be another discussion.

Actions #6

Updated by Claus Due about 8 years ago

To make this reality the following things need to be done:

Yes, that is what I intend to do.

Actions #7

Updated by Claus Due about 8 years ago

I would like to add here that we can actually scrap the render() method completely. It's not needed. If renderStatic exists, and it always does, that method can be called directly.

Actions #8

Updated by Frank Nägler about 8 years ago

  • Target version set to 8.0
Actions #9

Updated by Alexander Opitz about 8 years ago

  • Status changed from Needs Feedback to New
  • Target version changed from 8.0 to 8 LTS
Actions #10

Updated by Wouter Wolters almost 8 years ago

  • Tracker changed from Bug to Epic
Actions #11

Updated by Mathias Schreiber over 7 years ago

  • Status changed from New to Resolved
Actions #12

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF