I have a form that sends to an email. I have used composer to install sendgrid and things used to work when I originally set it up.
It's now some time later and my dev site is getting closer to a production release, so I was retesting the forms and they fail.
I've no doubt changed something in the interim that has broken it, but I'm struggling a bit to figure out what.
The error is:
Fatal error: Class 'Unirest' not found in /home/ubuntu/workspace/vendor/sendgrid/sendgrid/lib/SendGrid/Web.php on line 20
My composer.json is:
{
"name": "silverstripe/installer",
"description": "The SilverStripe Framework Installer",
"require": {
"php": ">=5.3.3",
"silverstripe/cms": "3.2.0",
"silverstripe/framework": "3.2.0",
"silverstripe/reports": "3.2.0",
"silverstripe/siteconfig": "3.2.0",
"silverstripe-themes/simple": "3.1.*",
"frankmullenger/gallery": "1.1.x-dev",
"sendgrid/sendgrid": "1.1.7",
"mashape/unirest-php": "dev-master",
"silverstripe/multiform": "*",
"silverstripe/kickassets": "^3.1",
"components/font-awesome": "^4.5"
},
"require-dev": {
"phpunit/PHPUnit": "~3.7"
},
"config": {
"process-timeout": 600
},
"prefer-stable": true,
"minimum-stability": "dev"
}
So Sendgrid is clearly being autoloaded, but Unirest isn't for some reason.
If I put some debug code in it confirms that class_exists('SendGrid') returns true but class_exists('Unirest') returns false.
Any ideas on how to troubleshoot?
Thanks