Skip to content

Commit

Permalink
Make AsMonologProcessor compatible with PHP 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Apr 8, 2022
1 parent f2f66cd commit 508df12
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/Monolog/Attribute/AsMonologProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,25 @@
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class AsMonologProcessor
{
/** @var string|null */
public $channel = null;
/** @var string|null */
public $handler = null;
/** @var string|null */
public $method = null;

/**
* @param string|null $channel The logging channel the processor should be pushed to.
* @param string|null $handler The handler the processor should be pushed to.
* @param string|null $method The method that processes the records (if the attribute is used at the class level).
*/
public function __construct(
public ?string $channel = null,
public ?string $handler = null,
public ?string $method = null,
?string $channel = null,
?string $handler = null,
?string $method = null
) {
$this->channel = $channel;
$this->handler = $handler;
$this->method = $method;
}
}
}

0 comments on commit 508df12

Please sign in to comment.