Fuel doesn't support PSR-4, and using the composer autoloader to load Fuel specific classes is a bad idea. So it's rather pointless converting your class filenames.
We're not trying to load Fuel specific classes via composer autoloader. We only want to load in our own custom classes via composer. The existing Fuel classes can continue to fallback on Fuel's autoloader. That isn't an issue.
yes, that works if we want to push all of our code into a src directory. We were hoping that there would be a way to keep our classes in the fuel/app/classes directory and have the composer autoloader look there first. However, it doesn't appear to work.
"autoload": {
"psr-4": {
"": ["fuel/app/classes/"],
}
},
The above does allow us to properly load:
\fuel\app\class\Foo\MyBar.php
via
new Foo\MyBar
However, if we attempt to load a class in:
fuel\app\classes\some\otherclass.php
via
new Some\Otherclass;
It will throw an exception due to the `some` directory name not having an uppercase first letter.
In the end, there doesn't appear to be any way to combine the two autoloaders and make them work.
./fuel/app/classes contain Fuel classes. That need exclusively be loaded by Fuel's own autoloader.
Like mikepmtl says, no problem using PSR-0 or PSR-4 to load your own classes (the Fuel autoloader supports PSR-0 at the moment, no need to use the composer autoloader for that), just use either the traditional composer way and create a separate package that gets installed in the vendor directory, or use a custom directory in ./fuel other than classes.