Page MenuHomePhabricator

Please make EmailNotification members protected (was public)
Closed, ResolvedPublic

Description

In 1.13, in class EmailNotification (UserMailer.php), the members "subject" and "body" used to be public. In 1.14, they suddenly became private, breaking some extensions that extend EmailNotification by subclassing.

Could you please either:

  1. Make these members protected instead of private, so we can subclass EmailNotification properly?
  2. Provide public set/get methods on these members?

Thank you.


Version: 1.15.x
Severity: enhancement

Details

Reference
bz17804

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:34 PM
bzimport set Reference to bz17804.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 5891
Unless there's a very good reason to make a property 'private', they should all be 'protected'.

Attached:

mwbugzilla wrote:

Comment on attachment 5891
Unless there's a very good reason to make a property 'private', they should all be 'protected'.

  • UserMailer.php Thu Mar 5 11:52:23 2009
  • UserMailer-new.php Thu Mar 5 11:53:09 2009 ***
  • 263,269 **** * */ class EmailNotification {

! private $to, $subject, $body, $replyto, $from;

	private $user, $title, $timestamp, $summary, $minorEdit, $oldid, $composed_common, $editor;
	private $mailTargets = array();
  • 263,269 ---- * */ class EmailNotification {

! protected $to, $subject, $body, $replyto, $from;

	protected $user, $title, $timestamp, $summary, $minorEdit, $oldid, $composed_common, $editor;
	protected $mailTargets = array();