1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-31 00:40:15 +02:00

Migrate to GH actions, add phpstan

This commit is contained in:
Jordi Boggiano
2020-12-09 13:49:22 +01:00
parent 1817faadd1
commit 279cf6a900
17 changed files with 183 additions and 54 deletions

View File

@@ -62,6 +62,7 @@ class ErrorHandler
//Forces the autoloader to run for LogLevel. Fixes an autoload issue at compile-time on PHP5.3. See https://github.com/Seldaek/monolog/pull/929
class_exists('\\Psr\\Log\\LogLevel', true);
/** @phpstan-ignore-next-line */
$handler = new static($logger);
if ($errorLevelMap !== false) {
$handler->registerErrorHandler($errorLevelMap);

View File

@@ -77,6 +77,7 @@ class DynamoDbHandler extends AbstractProcessingHandler
if ($this->version === 3) {
$formatted = $this->marshaler->marshalItem($filtered);
} else {
/** @phpstan-ignore-next-line */
$formatted = $this->client->formatAttributes($filtered);
}

View File

@@ -72,7 +72,7 @@ class FirePHPHandler extends AbstractProcessingHandler
*
* @see createHeader()
* @param array $record
* @return string
* @return array
*/
protected function createRecordHeader(array $record)
{

View File

@@ -27,7 +27,7 @@ use Monolog\Formatter\GelfMessageFormatter;
class GelfHandler extends AbstractProcessingHandler
{
/**
* @var Publisher the publisher object that sends the message to the server
* @var Publisher|PublisherInterface|IMessagePublisher the publisher object that sends the message to the server
*/
protected $publisher;

View File

@@ -270,10 +270,10 @@ class HipChatHandler extends SocketHandler
* will be the highest level from the given records. Datetime will be taken
* from the first record.
*
* @param $records
* @param array $records
* @return array
*/
private function combineRecords($records)
private function combineRecords(array $records)
{
$batchRecord = null;
$batchRecords = array();

View File

@@ -50,7 +50,7 @@ class RavenHandler extends AbstractProcessingHandler
protected $ravenClient;
/**
* @var LineFormatter The formatter to use for the logs generated via handleBatch()
* @var FormatterInterface The formatter to use for the logs generated via handleBatch()
*/
protected $batchFormatter;

View File

@@ -36,7 +36,7 @@ class RedisHandler extends AbstractProcessingHandler
* @param string $key The key name to push records to
* @param int $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
* @param int $capSize Number of entries to limit list size to
* @param int|false $capSize Number of entries to limit list size to
*/
public function __construct($redis, $key, $level = Logger::DEBUG, $bubble = true, $capSize = false)
{

View File

@@ -154,7 +154,7 @@ class StreamHandler extends AbstractProcessingHandler
return dirname(substr($stream, 7));
}
return;
return null;
}
private function createDir()

View File

@@ -522,7 +522,7 @@ class Logger implements LoggerInterface, ResettableInterface
/**
* Converts PSR-3 levels to Monolog ones if necessary
*
* @param string|int Level number (monolog) or name (PSR-3)
* @param string|int $level Level number (monolog) or name (PSR-3)
* @return int
*/
public static function toMonologLevel($level)

View File

@@ -168,7 +168,7 @@ class Utils
* Function converts the input in place in the passed variable so that it
* can be used as a callback for array_walk_recursive.
*
* @param mixed &$data Input to check and convert if needed
* @param mixed $data Input to check and convert if needed, passed by ref
* @private
*/
public static function detectAndCleanUtf8(&$data)