Autoloading in 5.7.4

Does anyone understand how autoloading works in Concrete 5.7(.4) ? I can't wrap my head around it. I thought I got it in 5.7.3 and now they changed stuff in 5.7.4.

I get the impression the autoloader looks only for certain folders in your package (/controllers, etc) and doesn't try to resolve the location by parsing the full class name. It does look like 5.7.4. is looking in a 'Src'-folder in your package (this wasn't the case in 5.7.3.). So classes in this folder do get autoloaded but not if they have underscores. So a class 'Test' in /my_package/src/test.php will be autoloaded but class 'TestTest' in /my_package/src/test_test.php won't.

I can't find any documentation concerning the issue.

View Replies:
Phallanx replied on at Permalink Reply
They always say that 5.7 uses a modified PSR-4 autoloader although they never quite say what those modifications are or why they modified it.

Here are the requirements for PSR-4 which pretty much explains your class naming issue.
exchangecore replied on at Permalink Reply
See the documentation on the Concrete 5.7+ autoloading here:
Phallanx replied on at Permalink Reply

Sweet. Thanks for that link.
guyasyou replied on at Permalink Reply
I have the same problem. In 5.7.3 everything worked as moved to 5.7.4 says "Class not found".
Justin1978 replied on at Permalink Reply
Hmmm, I figured it out, I think. Filenames now need to be camelcased just like the class names. Foldernames however still need to be lowercase. Classes need to be placed in the Src-folder (except for controllers and some other classes).