Changeset View
Standalone View
src/applications/metamta/adapter/PhabricatorMailPHPMailerLiteAdapter.php
- This file was moved from src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerLiteAdapter.php.
<?php | <?php | ||||
/** | /** | ||||
* TODO: Should be final, but inherited by SES. | * TODO: Should be final, but inherited by SES. | ||||
* | |||||
* @concrete-extensible | |||||
amckinley: So I googled this and only got hits for Phabricator revisions. This annotation is here to… | |||||
epriestleyAuthorUnsubmitted Done Inline ActionsYeah, the linter was complaining. This is a pretty old rule out of T795 very long ago, which waffled a bit around @stable and then got swapped to @concrete-extensible later or something. The original issue was that people kept sending us diffs to replace final/private/protected with public so they could extend random things in weird ways. In the cheery days of 2011 I was initially onboard with this, but soured quickly and moved toward "final absolutely everything we can". Over time we made it to a world where every class is either abstract or final, and I think that's the right outcome. There's a linter to warn about cases which aren't abstract or final. This class is "wrong": it should be final. However, SES extends it to use SMTP logic. An SES adapter is not a kind of PHPMailerLite adapter and this inheritance is definitely not "pure" or "correct", but I'll hopefully fix that a diff or two down the line and remove this comment/annotation/TODO, or fix it whenever T12404 happens if not here. Ideally, we should get rid of all of these and then make the linter rule stop allowing the exception. We only have 8 left including this one, although some may be a bit tricky to exorcise. epriestley: Yeah, the linter was complaining.
This is a pretty old rule out of T795 very long ago, which… | |||||
epriestleyAuthorUnsubmitted Done Inline ActionsD19965 eventually fixed these classtrees to get rid of the @concrete-extensible bit. epriestley: D19965 eventually fixed these classtrees to get rid of the `@concrete-extensible` bit. | |||||
amckinleyUnsubmitted Not Done Inline Actionsamckinley: Relevant: http://steve-yegge.blogspot.com/2010/07/wikileaks-to-leak-5000-open-source-java.html | |||||
*/ | */ | ||||
class PhabricatorMailImplementationPHPMailerLiteAdapter | class PhabricatorMailPHPMailerLiteAdapter | ||||
extends PhabricatorMailImplementationAdapter { | extends PhabricatorMailAdapter { | ||||
const ADAPTERTYPE = 'sendmail'; | const ADAPTERTYPE = 'sendmail'; | ||||
protected $mailer; | protected $mailer; | ||||
protected function validateOptions(array $options) { | protected function validateOptions(array $options) { | ||||
PhutilTypeSpec::checkMap( | PhutilTypeSpec::checkMap( | ||||
$options, | $options, | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |
So I googled this and only got hits for Phabricator revisions. This annotation is here to satisfy the linter for classes that can't be marked as abstract or final?