Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392903 )

Change subject: Deprecate OutputPage::parserOptions() as a setter
......................................................................

Deprecate OutputPage::parserOptions() as a setter

The only known callers were using it to call ->setEditSections( false ),
which has been the default since MediaWiki 1.19.

Change-Id: Ib021d7e80e44782ba6ebe66cf8366bae9147ce00
Depends-On: I7de0102e6cac6b5aa0147b825fa2cb6ebd37b434
Depends-On: I7b0604773a8692c7cb37fffa3fcb8aaac83d81ba
---
M RELEASE-NOTES-1.31
M includes/OutputPage.php
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/392903/1

diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31
index 5f91df6..3de0e17 100644
--- a/RELEASE-NOTES-1.31
+++ b/RELEASE-NOTES-1.31
@@ -104,6 +104,7 @@
   DifferenceEngine::MW_DIFF_VERSION should be used instead.
 * Use of Maintenance::error( $err, $die ) to exit script was deprecated. Use
   Maintenance::fatalError() instead.
+* Passing a ParserOptions object to OutputPage::parserOptions() is deprecated.
 
 == Compatibility ==
 MediaWiki 1.31 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 4635f99..a5f9c18 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1573,10 +1573,14 @@
         * Get/set the ParserOptions object to use for wikitext parsing
         *
         * @param ParserOptions|null $options Either the ParserOption to use or 
null to only get the
-        *   current ParserOption object
+        *   current ParserOption object. This parameter is deprecated since 
1.31.
         * @return ParserOptions
         */
        public function parserOptions( $options = null ) {
+               if ( $options !== null ) {
+                       wfDeprecated( __METHOD__ . ' with non-null $options', 
'1.31' );
+               }
+
                if ( $options !== null && !empty( $options->isBogus ) ) {
                        // Someone is trying to set a bogus pre-$wgUser PO. 
Check if it has
                        // been changed somehow, and keep it if so.

-- 
To view, visit https://gerrit.wikimedia.org/r/392903
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib021d7e80e44782ba6ebe66cf8366bae9147ce00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to