Commit bbb675a5 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[!!!][TASK] Remove ExtendedFileUtility ProcessData hook

The ExtendedFileUtility ProcessData hook is
superseded by a PSR-14 event.

Therefore, the hook and the corresponding
interface are now removed.

Resolves: #96180
Related: #95089
Releases: main
Change-Id: I4e8c8e31567365abe444edc840075640ec715680
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72442


Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent 8583e6ac
......@@ -281,23 +281,6 @@ class ExtendedFileUtility extends BasicFileUtility
break;
}
if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_extfilefunc.php']['processData'])) {
trigger_error(
'The hook $TYPO3_CONF_VARS[SC_OPTIONS][t3lib/class.t3lib_extfilefunc.php][processData] is deprecated and will stop working in TYPO3 v12.0. Use the AfterFileCommandProcessedEvent instead.',
E_USER_DEPRECATED
);
}
// Hook for post-processing the action
// @deprecated will be removed in TYPO3 v12.0.
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_extfilefunc.php']['processData'] ?? [] as $className) {
$hookObject = GeneralUtility::makeInstance($className);
if (!$hookObject instanceof ExtendedFileUtilityProcessDataHookInterface) {
throw new \UnexpectedValueException($className . ' must implement interface ' . ExtendedFileUtilityProcessDataHookInterface::class, 1279719168);
}
$hookObject->processData_postProcessAction($action, $cmdArr, $result[$action], $this);
}
GeneralUtility::getContainer()->get(EventDispatcherInterface::class)->dispatch(
new AfterFileCommandProcessedEvent([$action => $cmdArr], $result[$action][$key], (string)$this->existingFilesConflictMode)
);
......
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Utility\File;
/**
* Interface for classes which hook into extFileFunctions and do additional processData processing.
* @deprecated since TYPO3 v11 LTS, will be removed in TYPO3 v12.0. Use the PSR-14-based AfterFileCommandProcessedEvent instead.
*/
interface ExtendedFileUtilityProcessDataHookInterface
{
/**
* Post-process a file action.
*
* @param string $action The action
* @param array $cmdArr The parameter sent to the action handler
* @param array $result The results of all calls to the action handler
* @param \TYPO3\CMS\Core\Utility\File\ExtendedFileUtility $parentObject Parent object
*/
public function processData_postProcessAction($action, array $cmdArr, array $result, ExtendedFileUtility $parentObject);
}
......@@ -37,6 +37,7 @@ The following PHP interfaces that have previously been marked as deprecated for
- :php:`\TYPO3\CMS\Backend\Toolbar\ClearCacheActionsHookInterface`
- :php:`\TYPO3\CMS\Core\Resource\Hook\FileDumpEIDHookInterface`
- :php:`\TYPO3\CMS\Core\Utility\File\ExtendedFileUtilityProcessDataHookInterface`
- :php:`\TYPO3\CMS\Extbase\Mvc\View\ViewInterface`
- :php:`\TYPO3\CMS\Recordlist\RecordList\RecordListHookInterface`
......@@ -166,6 +167,7 @@ The following hooks have been removed:
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['FileDumpEID.php']['checkFileAccess']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/Modules/Recordlist/index.php']['drawHeaderHook']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/Modules/Recordlist/index.php']['drawFooterHook']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_extfilefunc.php']['processData']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']`
......
......@@ -520,6 +520,7 @@ return [
'$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'t3lib/class.t3lib_extfilefunc.php\'][\'processData\']' => [
'restFiles' => [
'Deprecation-95089-ExtendedFileUtilityProcessDataHook.rst',
'Breaking-96107-DeprecatedFunctionalityRemoved.rst',
],
],
'$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'additionalBackendItems\'][\'cacheActions\']' => [
......
......@@ -1827,6 +1827,7 @@ return [
'TYPO3\CMS\Core\Utility\File\ExtendedFileUtilityProcessDataHookInterface' => [
'restFiles' => [
'Deprecation-95089-ExtendedFileUtilityProcessDataHook.rst',
'Breaking-96107-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Backend\Toolbar\ClearCacheActionsHookInterface' => [
......
Supports Markdown
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