Deprecation: #90147 - Unified File Name Validator
See forge#90147
Description
The logic for validating if a new (uploaded) or renamed file's name is allowed
is now available in an encapsulated PHP class File
.
The functionality is moved so all logic is encapsulated in one single place:
- PHP constant
FILE_
is migrated into a class constant.DENY_ PATTERN_ DEFAULT Local
setting is only used when it differs from the default.Configuration. php - The
General
method has been marked as deprecated and callsUtility File
directly.Name Validator->is Valid ()
This optimization helps to only utilize and use PHPs memory if needed, and avoids to define run-time constants or variables. Logic is only initialized when needed - e.g. when uploading files or using TYPO3's importer via EXT:impexp.
In addition, the PHP constant PHP_
which is not
in use anymore, has been marked as deprecated, too.
Impact
Using the method General
directly will trigger a PHP E_
error.
Using the constants will continue to work but will stop doing so TYPO3 v11.0, when they will be removed.
The system-wide setting to override the default file deny pattern,
$GLOBALS
is only set when
different from the systems default. If it is the same, the option is not set anymore by TYPO3 Core.
Affected Installations
TYPO3 installations with PHP code calling the mentioned method directly or using one of the global constants directly.
Migration
Instead of calling
General
use
General
Instead of using the constant FILE_
, use File
.
For the PHP constant PHP_
there is no replacement, as it has no benefit for TYPO3 Core anymore.
The extension scanner will detect the method calls or the usage of the constants.