jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376868 )

Change subject: Simplify OutputPage constructor
......................................................................


Simplify OutputPage constructor

Make it impossible to instantiate this class without passing it
context. This appears to be the oldest wfDeprecated() in MediaWiki.
All callers have been updated.

Change-Id: I00b9e283ad22c6274b358063b9f9e60fe93d5ee7
---
M RELEASE-NOTES-1.31
M includes/OutputPage.php
2 files changed, 6 insertions(+), 9 deletions(-)

Approvals:
  Krinkle: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31
index efadf9a..498c473 100644
--- a/RELEASE-NOTES-1.31
+++ b/RELEASE-NOTES-1.31
@@ -45,7 +45,9 @@
 * The global function wfBCP47 was renamed to LanguageCode::bcp47.
 * The global function wfBCP47 is now deprecated.
 * The global function wfCountDown() is now deprecated in favor of
-  Maintenance::countDown().
+  Maintenance::countDown()
+* The OutputPage class constructor now requires a context parameter,
+  (instantiating without context was deprecated in 1.18)
 
 == 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 20b2c3c..7a2b7df 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -314,15 +314,10 @@
         * Constructor for OutputPage. This should not be called directly.
         * Instead a new RequestContext should be created and it will 
implicitly create
         * a OutputPage tied to that context.
-        * @param IContextSource|null $context
+        * @param IContextSource $context
         */
-       function __construct( IContextSource $context = null ) {
-               if ( $context === null ) {
-                       # Extensions should use `new RequestContext` instead of 
`new OutputPage` now.
-                       wfDeprecated( __METHOD__, '1.18' );
-               } else {
-                       $this->setContext( $context );
-               }
+       function __construct( IContextSource $context ) {
+               $this->setContext( $context );
        }
 
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00b9e283ad22c6274b358063b9f9e60fe93d5ee7
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to