Skip to content

Commit

Permalink
[!!!][TASK] Remove deprecated file reference functionality
Browse files Browse the repository at this point in the history
Removed class:

* TYPO3\CMS\Core\Resource\Service\UserFileInlineLabelService

Removed public method:

* TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter
    ->filterInlineChildren

Removed public static method:

* TYPO3\CMS\Core\Utility\ExtensionManagementUtility
    ->getFileFieldTCAConfig

Resolves: #101082
Related: #100963
Related: #98479
Releases: main
Change-Id: I5a7519baa65a8296bd417b46a40b7ffe0d6e26c3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79400
Tested-by: Oliver Klee <[email protected]>
Tested-by: core-ci <[email protected]>
Reviewed-by: Stefan Bürk <[email protected]>
Reviewed-by: Nikita Hovratov <[email protected]>
Tested-by: Nikita Hovratov <[email protected]>
Tested-by: Stefan Bürk <[email protected]>
Reviewed-by: Oliver Klee <[email protected]>
  • Loading branch information
sbuerk committed Jun 15, 2023
1 parent b7e667e commit 7d9f619
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 231 deletions.
24 changes: 0 additions & 24 deletions typo3/sysext/core/Classes/Resource/Filter/FileExtensionFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,6 @@ public function filter(
return $cleanReferences;
}

/**
* Entry method for use as DataHandler "inline" field filter
*
* @deprecated Will be removed in TYPO3 v13. Use filterFileReferences() directly instead.
*/
public function filterInlineChildren(array $parameters, DataHandler|DatabaseRecordList $dataHandler): array
{
trigger_error(
'FileExtensionFilter->filterInlineChildren() will be removed in TYPO3 v13.0. Use FileExtensionFilter->filter() instead.',
E_USER_DEPRECATED
);

$references = $parameters['values'] ?? [];
if (!is_array($references)) {
$references = [];
}
return $this->filter(
$references,
(string)($parameters['allowedFileExtensions'] ?? ''),
(string)($parameters['disallowedFileExtensions'] ?? ''),
$dataHandler
);
}

/**
* Entry method for use as filelist filter.
*
Expand Down

This file was deleted.

26 changes: 0 additions & 26 deletions typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,32 +523,6 @@ public static function addTcaSelectItemGroup(string $table, string $field, strin
$GLOBALS['TCA'][$table]['columns'][$field]['config']['itemGroups'] = $itemGroups;
}

/**
* Gets the TCA configuration for a field handling (FAL) files.
*
* @param string $fieldName Name of the field to be used
* @param array $customSettingOverride Custom field settings overriding the basics
* @param string $allowedFileExtensions Comma-separated list of allowed file extensions (e.g. "jpg,gif,pdf")
* @param string $disallowedFileExtensions Comma-separated list of disallowed file extensions (e.g. "doc,docx")
*
* @deprecated since TYPO3 v12.0. Use the TCA type "file" directly
*/
public static function getFileFieldTCAConfig(string $fieldName, array $customSettingOverride = [], string $allowedFileExtensions = '', string $disallowedFileExtensions = ''): array
{
trigger_error(
'ExtensionManagementUtility::getFileFieldTCAConfig() will be removed in TYPO3 v13.0. Use TCA type "file" directly instead.',
E_USER_DEPRECATED
);

$fileFieldTCAConfig = [
'type' => 'file',
'allowed' => $allowedFileExtensions,
'disallowed'=> $disallowedFileExtensions,
];
ArrayUtility::mergeRecursiveWithOverrule($fileFieldTCAConfig, $customSettingOverride);
return $fileFieldTCAConfig;
}

/**
* Adds a list of new fields to the TYPO3 USER SETTINGS configuration "showitem" list, the array with
* the new fields itself needs to be added additionally to show up in the user setup, like
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The following PHP classes that have previously been marked as deprecated for v12
- :php:`\TYPO3\CMS\Core\Exception\MissingTsfeException`
- :php:`\TYPO3\CMS\Core\ExpressionLanguage\DeprecatingRequestWrapper`
- :php:`\TYPO3\CMS\Core\Resource\Service\MagicImageService`
- :php:`\TYPO3\CMS\Core\Resource\Service\UserFileInlineLabelService`
- :php:`\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser`
- :php:`\TYPO3\CMS\Core\TypoScript\TemplateService`
- :php:`\TYPO3\CMS\Core\Utility\ResourceUtility`
Expand Down Expand Up @@ -127,6 +128,7 @@ The following PHP class methods that have previously been marked as deprecated f
- :php:`\TYPO3\CMS\Core\Database\Query\QueryBuilder->execute`
- :php:`\TYPO3\CMS\Core\Domain\Repository\PageRepository->getExtURL`
- :php:`\TYPO3\CMS\Core\Environment->getBackendPath`
- :php:`\TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter->filterInlineChildren`
- :php:`\TYPO3\CMS\Core\Session\UserSessionManager->createFromGlobalCookieOrAnonymous`
- :php:`\TYPO3\CMS\Dashboard\DashboardInitializationService->getRequireJsModules`
- :php:`\TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getContentObject`
Expand Down Expand Up @@ -196,6 +198,7 @@ The following PHP static class methods that have previously been marked as depre
- :php:`\TYPO3\CMS\Core\Utility\DebugUtility::debugRows`
- :php:`\TYPO3\CMS\Core\Utility\DebugUtility::printArray`
- :php:`\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr`
- :php:`\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig`
- :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::_GET`
- :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::_GP`
- :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::_GPmerged`
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2233,6 +2233,7 @@
'TYPO3\CMS\Core\Resource\Service\UserFileInlineLabelService' => [
'restFiles' => [
'Deprecation-98479-DeprecatedFileReferenceRelatedFunctionality.rst',
'Breaking-100963-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Frontend\Typolink\LinkResultFactory' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5383,6 +5383,7 @@
'maximumNumberOfArguments' => 2,
'restFiles' => [
'Deprecation-98479-DeprecatedFileReferenceRelatedFunctionality.rst',
'Breaking-100963-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->getQueryArguments' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,7 @@
'maximumNumberOfArguments' => 4,
'restFiles' => [
'Deprecation-98479-DeprecatedFileReferenceRelatedFunctionality.rst',
'Breaking-100963-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages' => [
Expand Down

0 comments on commit 7d9f619

Please sign in to comment.