I just noticed that it seems that Phonos is not registering when it is transcluding a file with the file= syntax.
Take https://en.wikipedia.beta.wmflabs.org/wiki/Phonos_without_any_IPA
Note how the following file is in use:
https://en.wikipedia.beta.wmflabs.org/wiki/File:Voiceover-mathml-example-1.wav
Note how this usage was not registered in the file usage table and the article where it was used is not listed in the file usage section:
https://en.wikipedia.beta.wmflabs.org/wiki/File:Voiceover-mathml-example-1.wav#filelinks
This should be a requirement for launch, as without it, invalidation for such file usages will not work.
Notes
The function for registering file dependencies is ParserOutput::addImage()
renderPhonos() in includes/Phonos.php already has conditional logic for if a file is passed and already has a Parser object available.
We can use Parser::getOutput() to get a ParserOutput object, and then call addImage() as shown below
$parser->getOutput()->addImage( $options['file'] );
Acceptance criteria
- Instances of Phonos which use a file correctly register a file dependency
QA
- Ensure a Phonos parser tag is using a file (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Phonos_without_any_IPA)
- Visit the file page (in this example, https://en.wikipedia.beta.wmflabs.org/wiki/File:Voiceover-mathml-example-1.wav)
- Ensure the page with the Phonos parser tag appears in the file's usage table (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/File:Voiceover-mathml-example-1.wav#filelinks)