Skip to content
Snippets Groups Projects
Commit e2b465b3 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Benni Mack
Browse files

[TASK] Deprecate StandaloneView for EXT:form EmailFinisher

With #90728 FluidEmail was added to the EXT:form EmailFinisher.
Therefore the StandaloneView has now been deprecated along with
the corresponding configuration option `templatePathAndFilename`,
which can't be used for FluidEmail.

Resolves: #92435
Releases: master
Change-Id: Iabda1d36b03f347d752f19452c2e3392990d303d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65921


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarMarcus Schwemer <ms@schwemer.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 44418dc6
Branches
Tags
No related merge requests found
.. include:: ../../Includes.txt
=================================================================
Deprecation: #92435 - Deprecated StandaloneView for EmailFinisher
=================================================================
See :issue:`92435`
Description
===========
The :php:`EmailFinisher` of EXT:form was extended for the possibility to use
FluidEmail in TYPO3 10. Therefore the previously used StandaloneView has now been
deprecated along with the configuration option :yaml:`templatePathAndFilename`.
Impact
======
Using the StandaloneView will trigger a deprecation log warning. Using
:yaml:`templatePathAndFilename` for custom templates will also trigger a
deprecation log warning.
Affected Installations
======================
All installations not already using FluidEmail for the EXT:form EmailFinisher.
Migration
=========
Adjust your finisher configuration to use FluidEmail by setting :yaml:`useFluidEmail: true`.
Before:
.. code-block:: yaml
finishers:
-
identifier: EmailToReceiver
options:
useFluidEmail: false
After:
.. code-block:: yaml
finishers:
-
identifier: EmailToReceiver
options:
useFluidEmail: true
For custom templates, replace :yaml:`templatePathAndFilename` with :yaml:`templateName`
and :yaml:`templateRootPaths`.
Before:
.. code-block:: yaml
finishersDefinition:
EmailToReceiver:
options:
templatePathAndFilename: EXT:sitepackage/Resources/Private/Templates/Email/ContactForm.html
After:
.. code-block:: yaml
finishersDefinition:
EmailToReceiver:
options:
templateName: ContactForm
templateRootPaths:
100: 'EXT:sitepackage/Resources/Private/Templates/Email/'
.. index:: YAML, NotScanned, ext:form
......@@ -198,12 +198,23 @@ class EmailFinisher extends AbstractFinisher
* @param string $format
* @return StandaloneView
* @throws FinisherException
* @deprecated since v11, will be removed in v12
*/
protected function initializeStandaloneView(FormRuntime $formRuntime, string $format): StandaloneView
{
trigger_error(
'Using StandaloneView for EmailFinisher \'' . $this->finisherIdentifier . '\' is deprecated and will be removed in v12. Please use FluidEmail in the finishers configuration instead.',
E_USER_DEPRECATED
);
$standaloneView = GeneralUtility::makeInstance(StandaloneView::class);
if (isset($this->options['templatePathAndFilename'])) {
trigger_error(
'The option \'templatePathAndFilename\' for EmailFinisher \'' . $this->finisherIdentifier . '\' is deprecated and will be removed in v12. Please use \'templateName\' and \'templateRootPaths\' in the finishers definition instead.',
E_USER_DEPRECATED
);
$this->options['templatePathAndFilename'] = strtr($this->options['templatePathAndFilename'], [
'{@format}' => $format
]);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment