[Bug 1047510] Review Request: php-opencloud - PHP SDK for OpenStack/Rackspace APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1047510



--- Comment #11 from Adam Williamson <awilliam@xxxxxxxxxx> ---
Gregor: I'm still buried deep in autoloader theory, but I'm starting to think
my approach is bad and yours is good. The convention seems to be to be
relatively conservative with autoloading: only use it on classes that are
explicitly registered with it, and have the autoloader implement some kind of
prefix handling rather than using the include_path.

I'll probably send an alternative PR which is closer to your approach, but
tries to be efficient for the case where upstream's 3rdparty directory is
present. I'm currently studying the Composer autoloader, which is quite an
advanced one, for hints.

I *do* think any reasonable autoloader implementation ought to try loading the
PSR-0 (or PSR-4! look that one up :/) class path relative to the defined
include path as a fallback if it can't find the class any other way, which is
roughly the approach you took. At least, this morning I do. Maybe this
afternoon I'll find another layer of this onion and change my mind :/

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review





[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]