@@ -38,6 +38,10 @@ class IFTTTHandler extends AbstractProcessingHandler
*/
public function __construct(string $eventName, string $secretKey, $level = Logger::ERROR, bool $bubble = true)
{
+ if (!extension_loaded('curl')) {
+ throw new MissingExtensionException('The curl extension is needed to use the IFTTTHandler');
+ }
+
$this->eventName = $eventName;
$this->secretKey = $secretKey;
@@ -59,6 +59,10 @@ class SendGridHandler extends MailHandler
public function __construct(string $apiUser, string $apiKey, string $from, $to, string $subject, $level = Logger::ERROR, bool $bubble = true)
+ throw new MissingExtensionException('The curl extension is needed to use the SendGridHandler');
parent::__construct($level, $bubble);
$this->apiUser = $apiUser;
$this->apiKey = $apiKey;
@@ -58,6 +58,10 @@ class SlackWebhookHandler extends AbstractProcessingHandler
bool $bubble = true,
array $excludeFields = array()
) {
+ throw new MissingExtensionException('The curl extension is needed to use the SlackWebhookHandler');
$this->webhookUrl = $webhookUrl;
@@ -90,6 +90,10 @@ class TelegramBotHandler extends AbstractProcessingHandler
bool $disableWebPagePreview = null,
bool $disableNotification = null
+ throw new MissingExtensionException('The curl extension is needed to use the TelegramBotHandler');