This question is about PSR-0 autoloaded libraries
I think you're conflating two different issues. Finding and loading the PHP code for
FooClass is (or ought to be) a different problem from how
new FooClass() or
FooClass::staticThing() should behave.
FooClass shouldn't care whether I (the guy using the library) relied on an autoloader or whether I hard-coded my own
library configuration PHP constants
One ground-rule first... never with constants from
define(). Polluting the global namespace is a bad idea, and IIRC even the new namespace features are a little weird in that regard. Class-constants on the library classes are acceptable, but as the library-consumer you probably aren't hand-editing those.
From your point of view (lib/framework developer), where/how should be declared your library configuration PHP constants
You mean, how would I prefer for consumer code to set options that affect my code? I'd prefer something like:
In other words, configure my library based on a mechanism I created for you to use. :p