Bug #88571

php extension fileinfo not required

Added by Anja Leichsenring about 1 month ago. Updated about 1 month ago.

Status:
Rejected
Priority:
Should have
Category:
-
Target version:
-
Start date:
2019-06-17
Due date:
% Done:

0%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues

Related to TYPO3 Core - Task #74177: Remove fileinfo as dependency in SystemEnvironment/Check Closed 2016-03-04

History

#1 Updated by Gerrit Code Review about 1 month ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61049

#2 Updated by Benni Mack about 1 month ago

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".

#3 Updated by Oliver Hader about 1 month ago

  • Related to Task #74177: Remove fileinfo as dependency in SystemEnvironment/Check added

#4 Updated by Oliver Hader about 1 month ago

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.

#5 Updated by Anja Leichsenring about 1 month ago

  • Status changed from Under Review to Rejected

Also available in: Atom PDF