Remove deprecated calling style of UserMailer::send()
authorReedy <reedy@wikimedia.org>
Thu, 21 Jan 2016 01:12:41 +0000 (01:12 +0000)
committerReedy <reedy@wikimedia.org>
Sat, 2 Apr 2016 18:02:10 +0000 (19:02 +0100)
Depends-On: I513639f706ce16334180908f55638eebf8a4de80
Depends-On: I3fce6c666e2c878a221e2e4c6acacfd0254d173a
Change-Id: I475932f37a579dd86bfd98e6b14509d6ba86f128

RELEASE-NOTES-1.27
includes/mail/UserMailer.php

index b6161da..0aebf38 100644 (file)
@@ -398,9 +398,11 @@ changes to languages because of Phabricator reports.
 * Skin::getUsableSkins() was removed (deprecated since 1.23).
 * LoadBalancer::pickRandom() was removed (deprecated in 1.21).
 * Article::getUndoText() and WikiPage::getUndoText were removed (deprecated since
- 1.21).
 1.21).
 * DifferenceEngine::setText() was removed (deprecated in 1.21).
 * Title::newFromRedirectArray() was removed (deprecated in 1.21).
+* UserMailer::send() no longer accepts $replyto as the 5th argument and $contentType
+  as the 6th. These must be passed in the options array now.
 
 == Compatibility ==
 
index 1c7fb98..1059d7b 100644 (file)
@@ -107,9 +107,6 @@ class UserMailer {
         *              'contentType' string default 'text/plain; charset=UTF-8'
         *              'headers' array Extra headers to set
         *
-        * Previous versions of this function had $replyto as the 5th argument and $contentType
-        * as the 6th. These are still supported for backwards compatability, but deprecated.
-        *
         * @throws MWException
         * @throws Exception
         * @return Status
@@ -117,14 +114,6 @@ class UserMailer {
        public static function send( $to, $from, $subject, $body, $options = [] ) {
                global $wgAllowHTMLEmail;
 
-               if ( !is_array( $options ) ) {
-                       // Old calling style
-                       wfDeprecated( __METHOD__ . ' with $replyto as 5th parameter', '1.26' );
-                       $options = [ 'replyTo' => $options ];
-                       if ( func_num_args() === 6 ) {
-                               $options['contentType'] = func_get_arg( 5 );
-                       }
-               }
                if ( !isset( $options['contentType'] ) ) {
                        $options['contentType'] = 'text/plain; charset=UTF-8';
                }