Problem/Motivation
The API documentation for hook_file_mimetype_mapping_alter() still refers to two functions which were removed by #1921558: Convert file_get_mimetype() to use Symfony MimeTypeGuessers.
- file_mimetype_mapping()
- file_default_mimetype_mapping()
Proposed resolution
Update the docblock for hook_file_mimetype_mapping_alter() to refer to the relevent parts of the new ExtensionMimeTypeGuesser class.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | interdiff-2297947-4-7.txt | 680 bytes | amitgoyal |
| #7 | cleanup-docs-hook_default_mimetype_mapping_alter-2297947-7.patch | 2.67 KB | amitgoyal |
Comments
Comment #1
andrewmacpherson commentedComment #2
jhodgdonThanks!
Our documentation standards currently require that when you refer to a class in documentation blocks, you include the full namespace of the class (starting with \ ), even in the text.
Other than that, it looks fine...
Comment #3
andrewmacpherson commentedThis patch updates the class names to the fully qualified format per #2, plus some slight rewording to make it fit the 80-character limit better.
It turns out there's another reference to file_mimetype_mapping(), but in he docblock for a function which is itself slated for removel. I've updated the docblock for the deprecated file_get_mimetype(), so it no longer directly refers to file_mimetype_mapping().
Comment #4
amitgoyal commentedMinor fixes to remove extra space and better utilization of available space.
Comment #5
jhodgdonLooks good to me now, thanks! ... Well, we normally say hooks are "invoked" rather than "called". Want to clean that up?
Comment #6
jhodgdonI'd also like to ask that this patch not be committed until #2299715: [meta] Move core hooks from system.api.php to core.api.php or other files is complete. That's a big patch and it's moving this hook.
Comment #7
amitgoyal commentedSure. Fixes as per #5.
Comment #8
jhodgdonLooks better, thanks! Again, I'd like to ask for this not to be committed until #2299715: [meta] Move core hooks from system.api.php to core.api.php or other files is dealt with, at which point this will need a reroll.
Comment #9
webchickDitto.
Comment #10
jhodgdonNever mind, the other patch already doesn't apply.
Comment #11
alexpottCommitted d29adc8 and pushed to 8.x. Thanks!