This is probably a stupid question, but here it is anyway; I’ve added a library with composer to my plugin, but I don’t know how to instantiate my class: none of these require statements work:
require_once(__DIR__ . '/vendor/autoload.php');
//require_once (__DIR__ . '/vendor/campaignmonitor/createsend-php/csrest_subscribers.php');
//$subscribers = require_once(__DIR__ . '/classes/createsend/csrest_subscribers.php');
$LIST_id = $this->config->get('plugins.campaignmonitor.listid');
$API_key = $this->config->get('plugins.campaignmonitor.apikey');
$this->createsend = new CS_REST_Subscribers($LIST_id, $API_key);
I get: PHP Fatal error: Class ‘Grav\Plugin\CS_REST_Subscribers’ not found
So it’s looking in the plugin namespace, instead of looking for the composer library.
How should I do this?