Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Avoid last usage of BU::getFuncCheck() and deprecate
Resolves: #99579 Releases: main Change-Id: If8aa4864656da59e328076c9240fcd31e5eba16c Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77425 Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com> Tested-by: Stefan Bürk <stefan@buerk.tech>
- Loading branch information
Showing
12 changed files
with
333 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
...e/Documentation/Changelog/12.2/Deprecation-99579-BackendUtilityGetFuncCheck.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.. include:: /Includes.rst.txt | ||
|
||
.. _deprecation-99579-1673983578: | ||
|
||
==================================================== | ||
Deprecation: #99579 - BackendUtility::getFuncCheck() | ||
==================================================== | ||
|
||
See :issue:`99579` | ||
|
||
Description | ||
=========== | ||
|
||
Method :php:`\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck()` has | ||
been marked as deprecated and should not be used any longer. | ||
|
||
|
||
Impact | ||
====== | ||
|
||
Calling the method will raise a deprecation level log error and will | ||
stop working with TYPO3 v13. | ||
|
||
|
||
Affected installations | ||
====================== | ||
|
||
The method may be used in extensions that add backend modules. The | ||
extension scanner finds usages with a strong match. | ||
|
||
|
||
Migration | ||
========= | ||
|
||
:php:`BackendUtility::getFuncCheck()` is a helper method that renders a | ||
select drop down and is typically used to trigger a GET request when | ||
the user selects an option. | ||
|
||
In general, such HTML should not be generated by PHP, but by Fluid templating. | ||
The method is thus typically used by old school backend modules that have not | ||
or only partially been transferred to Fluid, improving the controller-view | ||
separation. | ||
|
||
The most simple and ugly migration is to copy the method to an own controller | ||
that consumes the method. The better solution is to add the arguments as variables | ||
to the Fluid template and render the drop down in Fluid. This should be a pretty | ||
straight transition as well and typically avoids another :html:`<f:format.raw>` | ||
ViewHelper usage. | ||
|
||
Note that requests send by these drop downs should switch from GET to POST in | ||
case they change server state (eg. changing records) along the way: State changing | ||
requests should be restricted to POST as an additional security measure, and to | ||
not violate the HTTP protocol. The TYPO3 core comes with more and more examples | ||
on how to handle this properly. For instance all drop downs and checkbox toggles | ||
of the tstemplate extension (Web->TypoScript backend module) have been changed to | ||
do this and can be studied on how to trigger immediate POST actions when clicking | ||
such elements. | ||
|
||
.. index:: Backend, PHP-API, FullyScanned, ext:backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.