The mime type 'application/octet-stream' will still always be overwritten by
proper guesses. However, guesses with guessers that have a higher priority
will now overwrite previous guesses even if the mime types of these guesses
had a slash in them.
PHPBB3-13031
The newly added test case will also emulate a non-existing fileinfo
in order to check if the mimetype guesser is properly working when
fileinfo is not available.
PHPBB3-12071
Tests that depend on fileinfo being enabled will now be skipped to prevent
fatal errors while running the test suite. The expected results will be
modified to "application/octet-stream" in test_guess_files() if only the
extension_guesser is available due to the non-existing extension of those
files.
PHPBB3-12071
The mimetype guesser priority can now be set through the service definition.
Mimetypes will be guessed from the guesser with the highest priority to
the one with the lowest priority. Standard priority types have been added
to the service definition file. Any integer value can be used though.
Standard mimetype guessers that do not have the methods get_priority
and set_priority implemented, like the standard MimeTypeGuessers of symfony,
will have the default priority with the value of 0. Lower priority guessers
have values lower than 0 while high priority ones can be added with values
higher than 0.
PHPBB3-11912
The content_guesser now only guesses the mimetype with the function
mime_content_type() while the guessing by extension is done using the
extension_guesser.
PHPBB3-11912
The filename of the files sent to the guesser by plupload do not contain
the file extension. Therefore, it's impossible to guess the mimetype if
only the content_guesser is available and the function mime_content_type()
doesn't exist. By supplying the filename we can circumvent this issue.
PHPBB3-11912