Bug #88571
closed
php extension fileinfo not required
Added by Anja Leichsenring over 5 years ago.
Updated over 5 years ago.
Description
Class typo3/sysext/core/Classes/Type/File/FileInfo.php provides a function getMimeType, which uses functions of php extension fileinfo. If this extension is not available, mimetype will probably be false, at least if it is not provided by custom configuration via $GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['fileExtensionToMimeType'].
In order to properly provide mimetype detection, the php extension fileinfo needs to be a requirement.
- Status changed from New to Under Review
Anja Leichsenring wrote:
Class typo3/sysext/core/Classes/Type/File/FileInfo.php provides a function getMimeType, which uses functions of php extension fileinfo. If this extension is not available, mimetype will probably be false, at least if it is not provided by custom configuration via $GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['fileExtensionToMimeType'].
In order to properly provide mimetype detection, the php extension fileinfo needs to be a requirement.
There are circumstances where "fileinfo" is not provided (custom php compilation, also on cloud hosting - I know that this was an issue with Microsoft Azure in TYPO3 v8), so we'd prevent having TYPO3 on these systems... for now we'd have that fallback in place and use it as "suggest".
- Related to Task #74177: Remove fileinfo as dependency in SystemEnvironment/Check added
In phar-stream-wrapper package this implicit requirement had to be removed again as well - there were scenarios when
\finfo
was not available on PHP7 environments - e.g.
- Status changed from Under Review to Rejected
Also available in: Atom
PDF