Deprecation: #94317 - ext:form Finisher implementations
See forge#94317
Description
In preparation of the Extbase ObjectManager deprecation in favor of symfony dependency injection, some details of EXT:form finishers had to be adapted: In contrast to Extbase object management, symfony DI does not support prototype classes with a mixture of manual constructor arguments, plus dependency injection via other constructor arguments or inject methods.
The EXT:form finishers based on \TYPO3\
relied on this and had to be adapted: The default constructor argument
$finisher
has been dropped, so finisher implementations can
keep using dependency injection.
Impact
A compatibility layer detects non-adapted finishers and falls back to
initialization using Extbase ObjectManager. This will will trigger a
PHP E_
error.
Affected Installations
In general only instances with custom form based on EXT:form are affected, and only if they implement custom finishers.
Most custom finishers probably extend \TYPO3\
.
Those are only affected if they override __
or use or manipulate
properties $finisher
or $short
in
inject*
or inject
methods. This is rather unlikely.
Custom finishers that do not extend \TYPO3\
are affected.
Migration
Custom finishers should extend \TYPO3\
.
If they must implement __
, they should not expect $finisher
to be hand over as first argument and must not call parent::
anymore.
Custom finishers must not rely on $finisher
or $short
being set in early methods like __
, inject*
and inject
,
and must not set these properties.
Custom finishers must implement method set
, this method will
be added to \TYPO3\
in TYPO3 v12.
Custom finishers must not use class property $object
since this will vanish
in v12. This will affect more API cases and will have a dedicated deprecation file
with more details, though.