On Tue, Oct 1, 2024, at 23:02, Nick Lockheart wrote: > > > > Hey Nick, > > > > Is this actually an issue though? \Directory would be a weird thing > > to autoload. Most people tend to autoload specific namespaces. I > > think it would be weird to autoload into the global namespace. > > > > Maybe I am wrong, and that is why I ask. > > > > — Rob > > > In a situation where people aren't using namespaces at all, it would be > normal to create your own class with a conflicting name, not knowing > there was a built-in. >
Hey Nick, Your reply just gave me flashbacks of the days before ctrl-click and games of “Find the Buried Implementation.” Heh. I’m sure code like you describe exists, but I haven’t personally run into it (outside of WordPress) since 2011? In either case, auto loading was not in use. I’m not even sure how it would work (maybe a custom/manual class-map type thing)? Sleeping on it, I do agree that Directory is a poor name for a final class. You would expect something called Directory to be abstract and be implemented in concrete objects like FileDirectory, FTPDirectory, WebDavDirectory, S3Directory, etc. For the base abstraction of a directory to be final is a bit weird, IMHO. — Rob