Class not found when using a namespace

Permalink
I have an addon that someone is attempting to install. They are receiving this error:
Class 'Concrete\Package\MyPackage\Core\Installer' not found

In the file where this is called, the Installer class is referenced and aliased, such as:
use Concrete\Package\MyPackage\Core\Installer as Installer;

In my development and testing, I haven't had any issues. The person installing it is running PHP 5.3.10. I'm running 5.6.x. Do you think the version difference could be causing the problem?

The Installer class is also being called statically. Could this be the issue?

Thanks for your help.

SkyBlueSofa
 
hissy replied on at Permalink Reply
hissy
Could you share the path of your file?
SkyBlueSofa replied on at Permalink Reply
SkyBlueSofa
The package controller is at
{root}/packages/my_package/controller.php

And the called 'Installer' is at
{root}/packages/my_package/Core/Installer.php
hissy replied on at Permalink Reply
hissy
OK, I think you should change the directory

/packages/my_package/src/Installer.php

namespace Concrete/Package/MyPackage/Src;

class Installer
SkyBlueSofa replied on at Permalink Reply
SkyBlueSofa
Are you recommending that I create a 'Src' directory and put everything there? Instead of the 'Core' directory?
hissy replied on at Permalink Reply
hissy
Yes. Because the Autoloader had changed recently.

https://github.com/concrete5/concrete5-5.7.0/commit/3795a80724844d41...
hissy replied on at Permalink Reply
hissy
Do you have more questions about this? I'd like to use PageList+ in 5.7, but 5.7.0.0.1 package still use Core directory... I'll be happy to help you to make it compatible with latest 5.7.