Skip to content

Commit b0355ad

Browse files
committed
Deprecate HipChatHandler, fixes #1271
1 parent 447fb7b commit b0355ad

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/02-handlers-formatters-processors.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
[`mail()`](http://php.net/manual/en/function.mail.php) function.
3131
- _SwiftMailerHandler_: Sends emails using a [`Swift_Mailer`](http://swiftmailer.org/) instance.
3232
- _PushoverHandler_: Sends mobile notifications via the [Pushover](https://www.pushover.net/) API.
33-
- _HipChatHandler_: Logs records to a [HipChat](http://hipchat.com) chat room using its API.
3433
- _FlowdockHandler_: Logs records to a [Flowdock](https://www.flowdock.com/) account.
3534
- _SlackHandler_: Logs records to a [Slack](https://www.slack.com/) account using the Slack API.
3635
- _SlackbotHandler_: Logs records to a [Slack](https://www.slack.com/) account using the Slackbot incoming hook.
3736
- _SlackWebhookHandler_: Logs records to a [Slack](https://www.slack.com/) account using Slack Webhooks.
3837
- _MandrillHandler_: Sends emails via the Mandrill API using a [`Swift_Message`](http://swiftmailer.org/) instance.
3938
- _FleepHookHandler_: Logs records to a [Fleep](https://fleep.io/) conversation using Webhooks.
4039
- _IFTTTHandler_: Notifies an [IFTTT](https://ifttt.com/maker) trigger with the log channel, level name and message.
40+
- _HipChatHandler_: Logs records to a [HipChat](http://hipchat.com) chat room using its API. **Deprecated**: Use Slack handlers instead, see [Atlassian's announcement](https://www.atlassian.com/partnerships/slack)
4141

4242
### Log specific servers and networked logging
4343

src/Monolog/Handler/HipChatHandler.php

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ class HipChatHandler extends SocketHandler
9797
*/
9898
public function __construct($token, $room, $name = 'Monolog', $notify = false, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $format = 'text', $host = 'api.hipchat.com', $version = self::API_V1)
9999
{
100+
@trigger_error('The Monolog\Handler\HipChatHandler class is deprecated. You should migrate to Slack and the SlackWebhookHandler / SlackbotHandler, see https://www.atlassian.com/partnerships/slack', E_USER_DEPRECATED);
101+
100102
if ($version == self::API_V1 && !$this->validateStringLength($name, static::MAXIMUM_NAME_LENGTH)) {
101103
throw new \InvalidArgumentException('The supplied name is too long. HipChat\'s v1 API supports names up to 15 UTF-8 characters.');
102104
}

0 commit comments

Comments
 (0)