Take the 2-minute tour ×

I'm using SilverStripe 2.4.7 and am trying to use a PHP library that generates QR codes, see here. Now I thought I'd be ok just adding a folder in the mysite/code folder for the PHP code associated with the QR code generator but when I did SilverStripe had a hissy fit, wouldn't let me build the database and displayed this error:

ReflectionException: Class QRCode does not have a constructor

Can anyone explain why this is happening? Thanks

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

SilverStripe tries to autoload all classes. This one seems to miss a constructor...

Put the thirdparty code in its own directory and create a file _manifest_exclude, so it's not autoloaded. You can then load the class with require(), which you normally don't need to do thanks to autoloading ;-)

share|improve this answer
Thanks. That clears it up. Fingers crossed I can get it working now. –  MillyMonster Sep 27 '12 at 21:55
add comment

Your Answer


