Hi, I've been looking at the Symfony source, and find myself wondering why there isn't more integration among the various components.
As an example, Symfony\Component\Finder\Finder returns an iterator that has Symfony\Component\Finder\SplFileInfo. However, there is also a Symfony\Component\HttpFoundation\File\File class that extends PHP's SplFileInfo, but adds extension guessing, moving files, etc. So on both ends, why doesn't the iterator from Finder return instances of File instead of SplFileInfo? And why doesn't File extend the custom SplFileInfo that supports relative directories, instead of PHP's built-in one? I guess it's a small thing, but I want to use the finder, and want to have a Symfony\Component\HttpFoundation\File\File object, but am instead getting SplFileInfo. I'm sure there might be other cases of the same thing. I guess the File class, being in HttpFoundation, is supposed to be used more in the case of file uploads, but it might be useful in other contexts as well, and it seems that a file should be represented by one class, across the framework, or else specific subclasses for additional requirements. I would porpose: 1. Move Symfony\Component\HttpFoundation\File\File to Symfony\Component\File\File, and include the Symfony\Component\Finder\SplFileInfo functionality as well. 2. Have Symfony\Component\HttpFoundation\File\UploadedFile stay where it is obviously, and extend the proposed Symfony\Component\File\File. 3. Have the iterators in Symfony\Component\Finder\Iterator return Symfony\Component\File\File instead of SplFileInfo. Etc. Just being consistent. Brandon -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
