Deprecation: #100581 - Avoid constructor argument in FormDataCompiler

See forge#100581

Description

When instantiating the backend FormEngine related FormDataCompiler, the constructor argument FormDataGroupInterface should be omitted, the form data group should be provided as second argument to compile() instead.

Impact

Handing over the form data group as second argument to compile() allows injecting FormDataCompiler into controllers with TYPO3 v13 since the manual constructor argument will be removed.

Affected installations

Instances with own backend modules that use FormEngine to render records may be affected. Handing over the form data group as constructor argument to FormDataCompiler will trigger a deprecation level log warning with TYPO3 v12. With TYPO3 v13, the form data group must be provided as second argument to compile() and will not be optional anymore.

Migration

// before
$formDataCompiler = GeneralUtility::makeInstance(
    FormDataCompiler::class, GeneralUtility::makeInstance(MyDataGroup::class)
);
$formData = $formDataCompiler->compile($myFormDataCompilerInput);

// after
$formDataCompiler = GeneralUtility::makeInstance(FormDataCompiler::class);
$formData = $formDataCompiler->compile(
    $myFormDataCompilerInput,
    GeneralUtility::makeInstance(MyDataGroup::class)
);