Review main Merged

71089[TASK] Deprecate extbase ViewInterface

Christian Kuhn CR +2 V +2 Normal +147 −75 updated 09/16/21, 12:44

Commit message

The extbase ViewInterface fits little purpose: Most
methods are part of the fluid based class and interface
chain, with the exception of setControllerContext(),
which is deprecated, and initializeView(), which is
always only implemented as empty method.

The patch deprecates the interface keeping its usage
in API classes to prevent compatibility issues and
prepares the interface removal for v12.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
    • Jochen Roth +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
    • Jochen Roth +1
    • core-ci +1 CI

Issues 1

Files 18

Review log 1420

  1. Christian Kuhn uploaded patch set 1 09/15/21, 12:11

  2. Christian Kuhn updated the commit message in patch set 2 09/15/21, 12:13

  3. core-ci voted on patch set 1 V -1 09/15/21, 12:14 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16737

  4. core-ci voted on patch set 2 V -1 09/15/21, 12:17 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16738

  5. Christian Kuhn uploaded patch set 3 09/15/21, 12:21

  6. core-ci voted on patch set 3 V -1 09/15/21, 12:38 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16739

  7. Christian Kuhn uploaded patch set 4 09/15/21, 12:44

  8. core-ci voted on patch set 4 V +1 09/15/21, 12:57 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16740

  9. Jochen Roth voted on patch set 4 V +1 CR +1 09/15/21, 14:36

  10. Oli Bartsch commented on patch set 4 CR -1 09/15/21, 22:18

    MfaConfigurationController.php:38

    Could we just change this to TYPO3Fluid\Fluid\View\ViewInterface instead of using the actual implementation class? Same for the other classes.

    TotpProvider.php:261

    Using the interface here was on purpose, since it allows to easily change the actual implementation later on.

    DashboardController.php:54

    This has to be defined as nullable, since it's not initialized in constructor.

    ViewModuleController.php:57

    This has to be defined as nullable, since it's not initialized in constructor.

    ViewModuleController.php:95

    Wouldn't it make more sense to still initialize the view here (as the name suggests) and to return the object instead of manipulating a class variable? AFAICS $this->view is only used in showAction(), which is also the only method which calls intializeview(). Therefore, IMO no need for a class variable.
  11. Christian Kuhn commented on patch set 4 09/16/21, 09:49

    MfaConfigurationController.php:38 Reply

    i went with StandaloneView for two reasons: a) This internal controller uses StandaloneView directly, there is little point in type hinting an interface here. b) The fluid ViewInterface does not specify all methods - *maybe* a full interface should be created later, but that's a v12 task.

    TotpProvider.php:261 Reply

    fluid view interface does not have setTemplate which is used below.

    DashboardController.php:54 Reply

    no. it is never read before it's written. this is ok.

    ViewModuleController.php:57 Reply

    imho, no.

    ViewModuleController.php:95 Reply

    i suspect we'll inject a view instance later on. it's helpful to see this and having the current makeInstance() in __construct() for now, imho.
  12. Christian Kuhn commented on patch set 4 09/16/21, 11:45

    MfaConfigurationController.php:38 Reply

    Ack

    TotpProvider.php:261 Reply

    Ack

    DashboardController.php:54 Reply

    ok, we'll set nullable for now and will sort this out in coredev channel later.

    ViewModuleController.php:57 Reply

    ok, we'll set nullable for now and will sort this out in coredev channel later.

    ViewModuleController.php:95 Reply

    Ack
  13. Christian Kuhn uploaded patch set 5 09/16/21, 11:45

  14. core-ci voted on patch set 5 V +1 09/16/21, 12:00 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16794

  15. Christian Kuhn uploaded patch set 6 09/16/21, 12:31

  16. Jochen Roth voted on patch set 6 V +1 CR +1 09/16/21, 12:39

  17. Oli Bartsch voted on patch set 6 V +1 CR +1 09/16/21, 12:44

  18. core-ci voted on patch set 6 V +1 09/16/21, 12:44 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16797

  19. Christian Kuhn voted on patch set 6 V +2 CR +2 09/16/21, 12:44

  20. Christian Kuhn merged patch set 7 09/16/21, 12:44