Soft deprecate ContentHandler::getContentText()
ContentHandler::getContentText() was introduced as a migration helper and is mostly pointless now. Thus it should be deprecated and later removed. This patch softs deprecates that method. This patch also deprecates the corresponding setting $wgContentHandlerTextFallback. Bug: T268041 Change-Id: I7d477935a16316996c4f52a3d6466029745817b4
This commit is contained in:
parent
213a6329a6
commit
e34e93f24a
3 changed files with 9 additions and 0 deletions
|
|
@ -25,6 +25,9 @@ For notes on 1.36.x and older releases, see HISTORY.
|
|||
* …
|
||||
|
||||
==== Changed configuration ====
|
||||
* $wgContentHandlerTextFallback - This setting, which defines how to
|
||||
react if a plain text version of a non-text Content object is
|
||||
requested using ContentHandler::getContentText(), is deprecated.
|
||||
* …
|
||||
|
||||
==== Removed configuration ====
|
||||
|
|
@ -295,6 +298,8 @@ because of Phabricator reports.
|
|||
::setHookContainer() were hard deprecated. Use ::init() to inject
|
||||
dependencies or override ::postInitSetup() to do any custom
|
||||
post-initialization configuration.
|
||||
* ContentHandler::getContentText() and is now soft deprecated.
|
||||
Use Content::getText() instead.
|
||||
* …
|
||||
|
||||
=== Other changes in 1.37 ===
|
||||
|
|
|
|||
|
|
@ -2420,6 +2420,7 @@ $wgNamespaceContentModels = [];
|
|||
* * 'serialize': serialize to default format
|
||||
*
|
||||
* @since 1.21
|
||||
* @deprecated since 1.37
|
||||
*/
|
||||
$wgContentHandlerTextFallback = 'ignore';
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,9 @@ abstract class ContentHandler {
|
|||
*
|
||||
* @since 1.21
|
||||
*
|
||||
* @deprecated since 1.37, use Content::getText() for TextContent instances
|
||||
* instead
|
||||
*
|
||||
* @param Content|null $content
|
||||
*
|
||||
* @throws MWException If the content is not an instance of TextContent and
|
||||
|
|
|
|||
Loading…
Reference in a new issue