Last modified: 2014-04-10 20:10:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60479, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58479 - File class hierarchy is crazy
File class hierarchy is crazy
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 28032 (view as bug list)
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2013-12-14 06:32 UTC by Bawolff (Brian Wolff)
Modified: 2014-04-10 20:10 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bawolff (Brian Wolff) 2013-12-14 06:32:51 UTC
The File class (and related classes) should have a clearer class hierarchy.

*ArchivedFile doesn't extend anything
Besides all the duplicated code, this means that people who use "File" type hints, may be in for a nasty surprise

*ForeignDBFile is a subclass of LocalFile
This just doesn't really make sense logically. Even if code wise there isn't much difference, having a new class, say DBFile, that both LocalFile and ForeignDBFile extend, with perhaps minimal code in the new LocalFile class.

*Subclasses seem to be made on 2 dimensions - is the file current/old/deleted, and the repo type of the File. This should maybe be investigated if this is really a good way of splitting things up.
Comment 1 Bawolff (Brian Wolff) 2014-04-10 20:10:53 UTC
*** Bug 28032 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links