A bug on Webhook.php was found in line 41, which causes an error of
TypeError Argument 1 passed to Webfox\Xero\WebhookEvent::__construct() must be an instance of Webfox\Xero\OauthCredentialManager, null given
resolved by assigning the $credentialManager first, before creating the instance Collection$this->credentialManager = $credentialManager;$this->events = new Collection(array_map(function($event) {return new WebhookEvent($this->credentialManager, $this->accountingApi, $event);}, $this->properties->get('events')));
A bug on Webhook.php was found in line 41, which causes an error of
TypeError Argument 1 passed to Webfox\Xero\WebhookEvent::__construct() must be an instance of Webfox\Xero\OauthCredentialManager, null given
resolved by assigning the
$credentialManager
first, before creating the instanceCollection
$this->credentialManager = $credentialManager;
$this->events = new Collection(array_map(function($event) {
return new WebhookEvent($this->credentialManager, $this->accountingApi, $event);
}, $this->properties->get('events')));