Ver código fonte

Mark former public methods of SlackHandler as deprecated

The SlackRecord could be used now
Haralan Dobrev 9 anos atrás
pai
commit
000a21969f
1 arquivos alterados com 12 adições e 0 exclusões
  1. 12 0
      src/Monolog/Handler/SlackHandler.php

+ 12 - 0
src/Monolog/Handler/SlackHandler.php

@@ -156,9 +156,15 @@ class SlackHandler extends SocketHandler
      *
      *
      * @param  int    $level
      * @param  int    $level
      * @return string
      * @return string
+     * @deprecated Use underlying SlackRecord instead
      */
      */
     protected function getAttachmentColor($level)
     protected function getAttachmentColor($level)
     {
     {
+        trigger_error(
+            'SlackHandler::getAttachmentColor() is deprecated. Use underlying SlackRecord instead.',
+            E_USER_DEPRECATED
+        );
+
         return $this->slackRecord->getAttachmentColor($level);
         return $this->slackRecord->getAttachmentColor($level);
     }
     }
 
 
@@ -167,9 +173,15 @@ class SlackHandler extends SocketHandler
      *
      *
      * @param  array  $fields
      * @param  array  $fields
      * @return string
      * @return string
+     * @deprecated Use underlying SlackRecord instead
      */
      */
     protected function stringify($fields)
     protected function stringify($fields)
     {
     {
+        trigger_error(
+            'SlackHandler::stringify() is deprecated. Use underlying SlackRecord instead.',
+            E_USER_DEPRECATED
+        );
+
         return $this->slackRecord->stringify($fields);
         return $this->slackRecord->stringify($fields);
     }
     }
 }
 }