Page MenuHomePhabricator

Made some classes final.
ClosedPublic

Authored by joshuaspence on Feb 26 2014, 7:45 AM.
Tags
None
Referenced Files
F14416702: D8347.id19858.diff
Tue, Dec 24, 10:51 PM
F14413841: D8347.id19844.diff
Tue, Dec 24, 2:47 PM
Unknown Object (File)
Fri, Dec 20, 12:24 PM
Unknown Object (File)
Fri, Dec 20, 5:48 AM
Unknown Object (File)
Tue, Dec 17, 11:13 AM
Unknown Object (File)
Thu, Dec 12, 10:35 AM
Unknown Object (File)
Wed, Dec 4, 9:00 AM
Unknown Object (File)
Wed, Dec 4, 9:00 AM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rP7f5b15c6faaf: Made some classes final.
Summary

Currently, the linter raises XHP29 warnings for these files because they are not abstract or final.

I guess there are two possibly solutions, either making the classes final or marking them as @concrete-extensible. Given that there are no subclasses of these classes in the phabricator, arcanist and libphutil repositories... I opted to declare the classes as final.

Test Plan

The following linter warnings are gone:

>>> Lint for src/aphront/configuration/AphrontDefaultApplicationConfiguration.php:


   Warning  (XHP29) Class Not abstract Or final
    This class is neither 'final' nor 'abstract', and does not have a
    docblock marking it '@concrete-extensible'.

               3 /**
               4  * @group aphront
               5  */
    >>>        6 class AphrontDefaultApplicationConfiguration
               7   extends AphrontApplicationConfiguration {
               8
               9   public function __construct() {

>>> Lint for src/applications/differential/mail/DifferentialReplyHandler.php:


   Warning  (XHP29) Class Not abstract Or final
    This class is neither 'final' nor 'abstract', and does not have a
    docblock marking it '@concrete-extensible'.

               1 <?php
               2
    >>>        3 class DifferentialReplyHandler extends PhabricatorMailReplyHandler {
               4
               5   private $receivedMail;
               6

Diff Detail

Repository
rP Phabricator
Branch
class_not_abstract_or_final
Lint
Lint Passed
Unit
Tests Passed

Event Timeline

The context here is:

  • Facebook subclasses both of these, and we don't want to break them.
  • But we don't really want anyone else subclassing these classes, since Facebook's integrations are really old and gross.
  • Eventually, we'll theoretically get Facebook to move off their subclasses and then we can final these.

I'll accept @concrete-extensible plus a "NOTE: Do not extend this!" in the comment or similar to deal with lint.

joshuaspence updated this revision to Unknown Object (????).Feb 26 2014, 8:56 PM
  • Used @concrete-extensible instead of final.