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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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