ContentHandler::getContentText() was introduced as a migration helper when moving from text-only content to Content objects in 2011. It's mostly unused and pointless now, and should be replaced by:
$text = ( $content instanceof TextContent ) ? $content->getText() : null;
Steps:
- Soft-deprecate ContentHandler::getContentText()
- Remove usages of ContentHandler::getContentText() in core
- Remove usages of ContentHandler::getContentText() in extensions
- Hard-deprecate ContentHandler::getContentText() (after usage has been removed in all code maintained by WMF)
- Remove method after it has been hard deprecated in one release (so not before 1.36 has been branched)