mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-26 02:56:27 +02:00
Fix build issues
This commit is contained in:
@@ -43,10 +43,10 @@ class ProcessHandler extends AbstractProcessingHandler
|
|||||||
*/
|
*/
|
||||||
private array $pipes = [];
|
private array $pipes = [];
|
||||||
|
|
||||||
private float $timeout;
|
private float $timeout;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array<int, string[]>
|
* @var array<int, list<string>>
|
||||||
*/
|
*/
|
||||||
protected const DESCRIPTOR_SPEC = [
|
protected const DESCRIPTOR_SPEC = [
|
||||||
0 => ['pipe', 'r'], // STDIN is a pipe that the child will read from
|
0 => ['pipe', 'r'], // STDIN is a pipe that the child will read from
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ class SlackWebhookHandler extends AbstractProcessingHandler
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Slack Webhook token
|
* Slack Webhook token
|
||||||
|
*
|
||||||
|
* @var non-empty-string
|
||||||
*/
|
*/
|
||||||
private string $webhookUrl;
|
private string $webhookUrl;
|
||||||
|
|
||||||
@@ -36,7 +38,7 @@ class SlackWebhookHandler extends AbstractProcessingHandler
|
|||||||
private SlackRecord $slackRecord;
|
private SlackRecord $slackRecord;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $webhookUrl Slack Webhook URL
|
* @param non-empty-string $webhookUrl Slack Webhook URL
|
||||||
* @param string|null $channel Slack channel (encoded ID or name)
|
* @param string|null $channel Slack channel (encoded ID or name)
|
||||||
* @param string|null $username Name of a bot
|
* @param string|null $username Name of a bot
|
||||||
* @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise)
|
* @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise)
|
||||||
|
|||||||
@@ -201,6 +201,9 @@ class StreamHandler extends AbstractProcessingHandler
|
|||||||
fwrite($stream, (string) $record->formatted);
|
fwrite($stream, (string) $record->formatted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true
|
||||||
|
*/
|
||||||
private function customErrorHandler(int $code, string $msg): bool
|
private function customErrorHandler(int $code, string $msg): bool
|
||||||
{
|
{
|
||||||
$this->errorMessage = preg_replace('{^(fopen|mkdir|fwrite)\(.*?\): }', '', $msg);
|
$this->errorMessage = preg_replace('{^(fopen|mkdir|fwrite)\(.*?\): }', '', $msg);
|
||||||
|
|||||||
@@ -193,9 +193,8 @@ class LineFormatterTest extends MonologTestCase
|
|||||||
});
|
});
|
||||||
|
|
||||||
$message = $formatter->format($this->getRecord(Level::Critical, context: ['exception' => new \RuntimeException('Foo')]));
|
$message = $formatter->format($this->getRecord(Level::Critical, context: ['exception' => new \RuntimeException('Foo')]));
|
||||||
$trace = explode('[stacktrace]', $message, 2)[1];
|
$this->assertStringNotContainsString('[stacktrace]', $message);
|
||||||
$this->assertStringNotContainsString('#', $trace);
|
$this->assertStringEndsWith('"} []' . PHP_EOL, $message);
|
||||||
$this->assertSame(PHP_EOL . PHP_EOL . '"} []' . PHP_EOL, $trace);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDefFormatWithPreviousException()
|
public function testDefFormatWithPreviousException()
|
||||||
|
|||||||
Reference in New Issue
Block a user