Soxred93 wrote:
Before going
into too much detail on the thread, consider what you actually
need out of a fancy directory iterator. Offhand, I really can't think of
many places where that even *happens* in MediaWiki... maybe when purging
thumbnails?
I count 10 instances of opendir() exactly in trunk.
1 in language (listing languages), 3 in filerepo, 1 in the installer
(listing extensions) and the other in 4 file in maintenance.
takes more
effort than just using things built into PHP (there's at least 3 or for
directory iterator systems already, including the opendir() stuff, the
object-oriented variant in the Dir class, and the SPL iterators).
The main part of my push for this is that it isn't a new feature, but an easier way
to read and write code. Myself, at least, readdir(), opendir(), etc is very arcane and
confusing (same reason I don't use fopen, etc). RDI and SPL are even more confusing.
I'm just going from ym own experience here, but I'm just thinking that it would be
a good addition.
-X!
We are only using opendir for getting a full directory list.
It's fine changing it to DirectoryIterator but I don't think that
symfony sfFinder would be too useful here.
This is a bit of NIH, but
a) We wouldn't be using its full potential.
b) We will need to modify it (eg. usage of sfException)
c) Our copy becoming outdated from upstream is bad. We could keep the
changes to a minimum, but.
d) How long do you think it will take until someone wants to change its
underscore_methods to camelCase?