Deprecation: #84195 - Protected methods and properties in EditDocumentController
See forge#84195
Description
This file is about third party usage (consumer that call the class as well as
signals or hooks depending on it) of
\TYPO3\.
A series of class properties has been set to protected. They will throw deprecation warnings if called public from outside:
$editconf$defVals $overrideVals $columnsOnly $returnUrl $closeDoc $doSave $returnEdit Conf - [not scanned]
$uc $retUrl $R_URL_ parts $R_URL_ getvars $storeArray $storeUrl $storeUrl Md5 $docDat $docHandler - [not scanned]
$cmd - [not scanned]
$mirror $cacheCmd $redirect$returnNew Page Id $popView Id $popView Id_ add Params $viewUrl $recTitle $noView $MCONF- [not scanned]
$doc $perms_clause - [not scanned]
$template $content$R_URI $pageinfo$storeTitle $firstEl $errorC $newC $viewId $viewId_ add Params $modTSconfig $dontStore Document Ref
Some properties are set to
@internal and may vanish or be set to protected in v10 without further notice:
- [not scanned]
$data $elementsData
All methods not used as entry points by
\TYPO3\ will be
removed or set to protected in v10 and throw deprecation warnings if used from a third party:
preInit () doProcess Data () processData () - [not scanned]
init() - [note scanned]
main() makeEdit Form () compileForm () shortCut Link () openIn New Window Link () languageSwitch () localizationRedirect () getLanguages () fixWSversioning In Edit Conf () getRecord For Edit () compileStore Dat () getNew Icon Mode () closeDocument () setDocument ()
Two slots retrieve a parent object that will throw deprecation warnings if properties are read or
methods are called. They receive a
Server argument as second
argument instead:
TYPO3\CMS\ Backend\ Controller\ Edit Document Controller:: pre Init After TYPO3\CMS\ Backend\ Controller\ Edit Document Controller:: pre Init
Impact
Calling one of the above methods or accessing one of the above properties on an instance of
Edit will throw a deprecation warning in v9 and a PHP fatal in v10.
Affected Installations
The extension scanner will find most usages, but may also find some false positives. The most
common property and method names like
$data are not registered and will not be found
if an extension uses that on an instance of
Edit. In general all extensions
that set properties or call methods except
main are affected.
Installations may alse be affected, if the two signals
TYPO3\ and
TYPO3\
are used and the slot write to or reads from first argument "parent object".
Migration
In general, extensions should not instantiate and re-use controllers of the core. Existing
usages should be rewritten to be free of calls like these.
Registered slots for the two signals
pre and
init should read
(not write!) from new second argument
$request instead.
Slots that currently write to "parent object" should instead be turned into a PSR-15 middleware
to manipulate
$request before
Edit is called.