Seldaek/monolog · error · MissingExtensionException
The curl extension is needed to use the SlackWebhookHandler
Error message
The curl extension is needed to use the SlackWebhookHandler
What it means
Error "The curl extension is needed to use the SlackWebhookHandler" thrown in Seldaek/monolog.
Source
Thrown at src/Monolog/Handler/SlackWebhookHandler.php:65
* @param bool $includeContextAndExtra Whether the attachment should include context and extra data
* @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2']
*
* @throws MissingExtensionException If the curl extension is missing
*/
public function __construct(
string $webhookUrl,
?string $channel = null,
?string $username = null,
bool $useAttachment = true,
?string $iconEmoji = null,
bool $useShortAttachment = false,
bool $includeContextAndExtra = false,
$level = Level::Critical,
bool $bubble = true,
array $excludeFields = []
) {
if (!\extension_loaded('curl')) {
throw new MissingExtensionException('The curl extension is needed to use the SlackWebhookHandler');
}
parent::__construct($level, $bubble);
$this->webhookUrl = $webhookUrl;
$this->slackRecord = new SlackRecord(
$channel,
$username,
$useAttachment,
$iconEmoji,
$useShortAttachment,
$includeContextAndExtra,
$excludeFields
);
}
public function getSlackRecord(): SlackRecordView on GitHub (pinned to 57eb102834)
When it happens
Trigger: Thrown at src/Monolog/Handler/SlackWebhookHandler.php:65 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Seldaek/monolog@57eb102834 (2026-08-17).
Data as JSON: /api/errors/3f3056de9904b3be.
Report an issue: GitHub.