A native implementation of PSR-0 using only the autoloader from the PSR-0 example in the spec would expect a folder structure like this:
League\Oauth2\Client\Foo = myapp/somefolder/League/Oauth2/Client/Foo.php
League\Oauth2\Server\Bar = myapp/somefolder/League/Oauth2/Server/Bar.php
If I was making these as packages, I could make them into two packages, which would be installed in different locations, because thats how Composer rolls:
League\Oauth2\Client\Foo = myapp/vendor/league/oauth2/src/League/Oauth2/Client/Foo.php
League\Oauth2\Server\Bar = myapp/vendor/league/oauth2-server/src/League/Oauth2/Server/Bar.php
Phil,
Under no circumstances should an autoloader EVER throw an exception or an error. That's the failure of
SplClassLoader
, and one of the failures ofPSR-0
(because it does not specify that). So no, Point B should not be "it should throw an exception". It should be "It should never under any circumstance directly throw an exception or error". Any other behavior is in bad form.As far as your examples being "perfectly PSR-0", not based on the reference implementation. Since that's put in the spec, it cannot be divorced from the spec. Therefore, if it works in Composer, but not in the reference implementation, that implies that Composer isn't implementing the specification properly. That's it.