This method returns null when $mime is 'unknown/unknown' and the file extension is unknown to MediaWiki. The inline documentation and @return annotation omitted this. I don't think this was an intentional design choice, but it's the existing behavior and I'm not sure it's safe to change. Since it is the existing behavior, document it and add a test case, to ensure that any changes to this behavior are intentional. Bug: T253483 Change-Id: Ie6615a4bd9ae77e9ab59cfe76edb237cace693b1 |
||
|---|---|---|
| .. | ||
| AutoloadGenerator.php | ||
| AvroValidator.php | ||
| BatchRowIterator.php | ||
| BatchRowUpdate.php | ||
| BatchRowWriter.php | ||
| ClassCollector.php | ||
| ExecutableFinder.php | ||
| FileContentsHasher.php | ||
| MWCryptHKDF.php | ||
| MWCryptRand.php | ||
| MWFileProps.php | ||
| MWRestrictions.php | ||
| README | ||
| RowUpdateGenerator.php | ||
| UIDGenerator.php | ||
| ZipDirectoryReader.php | ||
| ZipDirectoryReaderError.php | ||
The classes in this directory are general utilities for use by any part of MediaWiki. They do not favour any particular user interface and are not constrained to serve any particular feature. This is similar to includes/libs, except that some dependency on the MediaWiki framework (such as the use of MWException, Status or wfDebug()) disqualifies them from use outside of MediaWiki without modification. Utilities should not use global configuration variables, rather they should rely on the caller to configure their behaviour.