Content::getNativeData() should be removed because it misguides calling code into making baseless assumptions about the return value, which cannot be used with confidence. This includes core and WMF-maintained extensions.
There is no good reason for Content::getNativeData() to exist, since it guarantees nothing about the structure or format of the content. The only sensible use cases are for textual content. For that use case, a more narrow method getText should be created in TextContent. Other code using getNativeData is conceptually flawed by definition, since the return value cannot be used confidently. Structured content models, like EntityContent in the Wikibase extension, should (and typically do) define their own specialized getter methods for the internal structure.
See the subtasks of this task for extensions to fix.
Subtasks T283667 to T283686 are WMF deployed extensions.
Subtasks T283687 to T283704 are extensions not deployed on WMF servers.
Extensions already fixed (before dedicated subtasks were created, for remaining extensions):
- AutoCategoriseUploads
- Babel - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Babel/+/498477
- BlueSpiceInsertTemplate - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/BlueSpiceInsertTemplate/+/499485
- CollaborationKit - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CollaborationKit/+/499826
- DidYouKnow - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DidYouKnow/+/499489
- Echo - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Echo/+/498483
- EducationProgram (Archived)
- NotebookViewer - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/NotebookViewer/+/499496
- OpenStackManager - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/OpenStackManager/+/499498
- RSS - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/RSS/+/499499
- Scribunto - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Scribunto/+/499501
- TemplateData - 028aaba896415b4578ae84b56168e8d4a36af6c6
- Video - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Video/+/499502