1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-08 14:16:42 +02:00

Fix min requirements

This commit is contained in:
Jordi Boggiano
2015-06-05 11:44:02 +01:00
parent e064827e23
commit 5c6acb68d5
2 changed files with 7 additions and 6 deletions

View File

@@ -17,7 +17,7 @@
"psr/log": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"phpunit/phpunit": "~4.5",
"graylog2/gelf-php": "~1.0",
"raven/raven": "~0.5",
"ruflin/elastica": ">=0.90 <3.0",

View File

@@ -13,6 +13,7 @@ namespace Monolog\Handler;
use Gelf\IMessagePublisher;
use Gelf\PublisherInterface;
use Gelf\Publisher;
use InvalidArgumentException;
use Monolog\Logger;
use Monolog\Formatter\GelfMessageFormatter;
@@ -31,7 +32,7 @@ class GelfHandler extends AbstractProcessingHandler
protected $publisher;
/**
* @param PublisherInterface|IMessagePublisher $publisher a publisher object
* @param PublisherInterface|IMessagePublisher|Publisher $publisher a publisher object
* @param integer $level The minimum logging level at which this handler will be triggered
* @param boolean $bubble Whether the messages that are handled can bubble up the stack or not
*/
@@ -39,8 +40,8 @@ class GelfHandler extends AbstractProcessingHandler
{
parent::__construct($level, $bubble);
if (!$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) {
throw new InvalidArgumentException("Invalid publisher, expected a Gelf\IMessagePublisher or Gelf\PublisherInterface instance");
if (!$publisher instanceof Publisher && !$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) {
throw new InvalidArgumentException("Invalid publisher, expected a Gelf\Publisher, Gelf\IMessagePublisher or Gelf\PublisherInterface instance");
}
$this->publisher = $publisher;