composer/composer — pull request #2309 by df-jablan (2013-10-07 19:44:36+00:00)
Title: Autoloader mod to deal with projects that have a "target-dir"

In writing our library unit tests, we discovered that the autoloader does not properly look in the right place for projects that contain a "target-dir" configuration option.

Because the autoloader has no knowledge of composer or the configuration, it the target-dir is assumed to be the namespace. This portion is removed from the directory before the file_exists() check.

I've tested this fix and it works perfectly for this application. I know you know there is trouble with the "target-dir", but this is a decent fix until the new PSR is out and code is compliant.