wiki.techinc.nl/tests
Ori Livneh 7e01e86e09 mime: Represent lists as arrays instead of space-delimited strings
Deprecate the interfaces in MimeAnalyzer that return lists as
space-separated strings in favor of replacement methods that return
arrays.

Deprecated:

 - ::getExtensionsForType( $mime ) : string|null
 - ::getTypesForExtension( $ext ) : string|null
 - ::guessTypesForExtension( $ext ) : string|null

Added:

 - ::getExtensionsFromMimeType( $mime ) : string[]
 - ::getMimeTypesFromExtension( $ext ) : string[]
 - ::getExtensionFromMimeTypeOrNull( $mime ) : string|null
 - ::getMimeTypeFromExtensionOrNull( $ext ) : string|null

- "From" is clearer than "For"[1] and is neatly symmetrical with "To"
  (viz. ::mExtToMime and ::mMimeToExt).
- "MimeType" is less ambiguous than "Type", which in this context may
  refer either to media type or MIME type.
- "{..}OrNull" is better because it helps users remember to handle a null
  return value. Putting the "OrNull" at the end (getXFromYOrNull) is
  better than putting it in the middle (getXOrNullFromY) because it's
  harder to ignore that way, at the cost of a very slight grammatical
  ambiguity.

Usage in Core will updated in a separate commit.

Lastly, this change prepares for the deprecation of mutating the public
'mExtToMime' attribute as a means of registering extensions. It will be
formally deprecated in a follow-up change.

  [1]: Positive signal: https://developer.android.com/reference/android/webkit/MimeTypeMap#getMimeTypeFromExtension(java.lang.String)

Bug: T252228
Change-Id: I93bd71ec18492722f05c66e0a2945d93281c3100
2020-05-28 15:15:43 +00:00
..
api-testing Merge "CreationHandler: fix redirect URL" 2020-05-26 19:07:43 +00:00
common Introduce UserOptionsManager and DefaultOptionsManager 2020-04-28 15:42:43 -07:00
integration/includes Narrow MediaWiki.Commenting.FunctionComment.WrongStyle 2020-05-20 03:33:39 +01:00
parser Add caption to always suppressing 2020-05-27 12:29:59 -04:00
phan
phpunit mime: Represent lists as arrays instead of space-delimited strings 2020-05-28 15:15:43 +00:00
qunit mediawiki.util: Add mw.util.parseImageUrl 2020-05-23 00:20:09 +00:00
selenium Merge "Revert "Selenium: Use wdio-video-reporter to record videos of test run"" 2020-05-20 10:56:53 +00:00
.htaccess