Class not found in 5.7.5

Permalink
Hi,

Just installed a 5.7.5. I installed a package that I use in 5.7.4.2.

Something goes wrong when I try to use a class. It won't be found but I'm sure it is there.

I stepped into the debugger and see the following happening:

The package get's registered, but when looking for the class (let's say: Concrete\Package\Blabla\Src\Bla\BlaFoo), it will try to find ...packages/blabla/src/Bla/BlaFoo.php.
The actual file is ...packages/blabla/src/bla/bla_foo.php.

Am I doing something wrong here?

4Concrete5
 
ramonleenders replied on at Permalink Reply
ramonleenders
I think I had the same issue once where 5.7.5 (RC) couldn't find underscore file anymore. You have to camelcase the file. So don't name it bla_foo.php but BlaFoo.php instead.

Should work. Otherwise post a screenshot of the error and actual filename(s)!
4Concrete5 replied on at Permalink Reply
4Concrete5
Has this changed in the 5.7.5 version? It was always to use lowercase with an underscore notation.

I know it works camelcased, but that doesn't work in (lets say) 5.7.4.x?
ramonleenders replied on at Permalink Reply
ramonleenders
Camelcased should work in 5.7.4 too, it at least does for my packages. I did have some issues on OSX though with double loading classes (because of autoloading most likely), but that could have had a different cause. Just rename it and let people test on OSX too if you're not on OSX yourself.
marioBaer replied on at Permalink Reply
Hi,

i also updated from 5.7.4.2 to 5.7.5.1 and i have the same problem with classes not found by autoloader in packages (and only there!).

I also tried to rename the files to Camelcase-style, but this didn't work.

An example from what i did:

I renamed file

packages/mypackage/helpers/locations_helper.php

to

packages/mypackage/helpers/LocationsHelper.php.

I also tried to rename the folders containing the class, but also didn't work.

Namespace is namespace Concrete\MyPackage\Trueromance\Helpers and the class name LocationsHelper.

Am i missing something here? Any help is appreciated. :-)
rklomp replied on at Permalink Reply
I have got a similar issue:
https://www.concrete5.org/community/forums/5-7-discussion/class-not-...

Have you solved this?
a575606 replied on at Permalink Reply
I'm having the same issue with a package which worked fine on 5.7.4, but doesn't on 5.7.5.1. The class isn't found, but used to be. Unfortunately it's my contact form so it's pretty important. Hope someone can help.
use Concrete\Package\CustomContactForm\Src\CustomContactForm as ContactFormSubmission;
SnefIT replied on at Permalink Reply
SnefIT
Use camelcased filename.
ramonleenders replied on at Permalink Reply
ramonleenders
Yup, the file should be called "ContactFormSubmission.php". Probably it's "contact_form_submission.php"? Let us know if that's the case!
a575606 replied on at Permalink Reply
Worked like a charm. Thanks guys