Please leave your comments for the Autoload path depth insanity blog post on this gist.
Any type of feedback is welcome. Including alternate suggestions, corrections, insults, etc. Thanks!
P.S.: I apologize for the crappy format. I will try go get a better way to post comments soon, promise!
FWIW, I agree. It would be a small improvement.
On the other hand, I think PSR-0 has bigger issues, namely I'd like to be able to separate classes on the file system for logical grouping while browsing, but still have them in the same namespace because they belong together and that would reduce
use
-hell.For example, all the Exception subnamespaces make no sense IMO. Why should I
use Vendor\MyLib\Exception\FooBarException;
fromVendor\MyLib\Logic
? Simply throwingFooBarException
would be easier, but if I want to stow away my exception classes under a subdir to avoid cruft in the main one, I have to use a different namespace.Obviously this would be a broader divergeance from PSR-0, and I am not sure if there is a way to define rules to allow this to work as I want without allowing a mess to emerge. Obviously I could already use classmap right now to do this, but as @igorw pointed out, that has drawbacks too. Anyway just throwing this out here, in case someone else has an idea.