Project

General

Profile

Actions

Bug #95853

closed

DI in form finishers is not working

Added by Elias Häußler about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2021-11-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Problem

Since #94317 dependency injection for form finishers no longer works. This is due to the fact that finishers are now constructed by GeneralUtility::makeInstance. Since the finisher services are not public, dependencies are not getting injected anymore.

Possible solution

Make form finishers public by default, e.g. by using the PublicServicePass.

Steps to reproduce

  1. Generate new form or modify existing form
  2. Add `ConfirmationFinisher` with finisher option `contentElementUid`
  3. Try to send form in Frontend
  4. You should get an exception `TypoScript object path "lib.tx_form.contentElementRendering" does not exist`

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #95540: tx_form ConfirmationFinisher does not execute the methods injectConfigurationManager and injectContentObjectRendererClosed2021-10-08

Actions
Related to TYPO3 Core - Task #94317: Avoid ObjectManager around ext:form FormDefinitionClosed2021-06-11

Actions
Actions

Also available in: Atom PDF