summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.php_cs2
-rw-r--r--composer.json2
-rw-r--r--src/Monolog/DateTimeImmutable.php8
-rw-r--r--src/Monolog/ErrorHandler.php2
-rw-r--r--src/Monolog/Formatter/ChromePHPFormatter.php2
-rw-r--r--src/Monolog/Formatter/ElasticaFormatter.php2
-rw-r--r--src/Monolog/Formatter/FlowdockFormatter.php2
-rw-r--r--src/Monolog/Formatter/FluentdFormatter.php2
-rw-r--r--src/Monolog/Formatter/FormatterInterface.php2
-rw-r--r--src/Monolog/Formatter/GelfMessageFormatter.php9
-rw-r--r--src/Monolog/Formatter/HtmlFormatter.php5
-rw-r--r--src/Monolog/Formatter/JsonFormatter.php2
-rw-r--r--src/Monolog/Formatter/LineFormatter.php2
-rw-r--r--src/Monolog/Formatter/LogglyFormatter.php2
-rw-r--r--src/Monolog/Formatter/LogstashFormatter.php2
-rw-r--r--src/Monolog/Formatter/MongoDBFormatter.php2
-rw-r--r--src/Monolog/Formatter/NormalizerFormatter.php23
-rw-r--r--src/Monolog/Formatter/ScalarFormatter.php2
-rw-r--r--src/Monolog/Formatter/WildfireFormatter.php2
-rw-r--r--src/Monolog/Handler/AbstractHandler.php2
-rw-r--r--src/Monolog/Handler/AbstractProcessingHandler.php2
-rw-r--r--src/Monolog/Handler/AbstractSyslogHandler.php4
-rw-r--r--src/Monolog/Handler/AmqpHandler.php2
-rw-r--r--src/Monolog/Handler/BrowserConsoleHandler.php2
-rw-r--r--src/Monolog/Handler/BufferHandler.php2
-rw-r--r--src/Monolog/Handler/ChromePHPHandler.php2
-rw-r--r--src/Monolog/Handler/CouchDBHandler.php4
-rw-r--r--src/Monolog/Handler/CubeHandler.php2
-rw-r--r--src/Monolog/Handler/Curl/Util.php2
-rw-r--r--src/Monolog/Handler/DeduplicationHandler.php4
-rw-r--r--src/Monolog/Handler/DoctrineCouchDBHandler.php2
-rw-r--r--src/Monolog/Handler/DynamoDbHandler.php2
-rw-r--r--src/Monolog/Handler/ElasticSearchHandler.php2
-rw-r--r--src/Monolog/Handler/ErrorLogHandler.php2
-rw-r--r--src/Monolog/Handler/FilterHandler.php2
-rw-r--r--src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php2
-rw-r--r--src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php2
-rw-r--r--src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php2
-rw-r--r--src/Monolog/Handler/FingersCrossedHandler.php2
-rw-r--r--src/Monolog/Handler/FirePHPHandler.php2
-rw-r--r--src/Monolog/Handler/FleepHookHandler.php2
-rw-r--r--src/Monolog/Handler/FlowdockHandler.php2
-rw-r--r--src/Monolog/Handler/FormattableHandlerInterface.php2
-rw-r--r--src/Monolog/Handler/FormattableHandlerTrait.php2
-rw-r--r--src/Monolog/Handler/GelfHandler.php2
-rw-r--r--src/Monolog/Handler/GroupHandler.php2
-rw-r--r--src/Monolog/Handler/Handler.php2
-rw-r--r--src/Monolog/Handler/HandlerInterface.php2
-rw-r--r--src/Monolog/Handler/HandlerWrapper.php2
-rw-r--r--src/Monolog/Handler/HipChatHandler.php2
-rw-r--r--src/Monolog/Handler/IFTTTHandler.php2
-rw-r--r--src/Monolog/Handler/LogEntriesHandler.php2
-rw-r--r--src/Monolog/Handler/LogglyHandler.php2
-rw-r--r--src/Monolog/Handler/MailHandler.php4
-rw-r--r--src/Monolog/Handler/MandrillHandler.php2
-rw-r--r--src/Monolog/Handler/MissingExtensionException.php2
-rw-r--r--src/Monolog/Handler/MongoDBHandler.php2
-rw-r--r--src/Monolog/Handler/NativeMailerHandler.php4
-rw-r--r--src/Monolog/Handler/NewRelicHandler.php2
-rw-r--r--src/Monolog/Handler/NullHandler.php2
-rw-r--r--src/Monolog/Handler/PHPConsoleHandler.php2
-rw-r--r--src/Monolog/Handler/ProcessHandler.php2
-rw-r--r--src/Monolog/Handler/ProcessableHandlerInterface.php2
-rw-r--r--src/Monolog/Handler/ProcessableHandlerTrait.php2
-rw-r--r--src/Monolog/Handler/PsrHandler.php2
-rw-r--r--src/Monolog/Handler/PushoverHandler.php2
-rw-r--r--src/Monolog/Handler/RavenHandler.php2
-rw-r--r--src/Monolog/Handler/RedisHandler.php2
-rw-r--r--src/Monolog/Handler/RollbarHandler.php2
-rw-r--r--src/Monolog/Handler/RotatingFileHandler.php5
-rw-r--r--src/Monolog/Handler/SamplingHandler.php2
-rw-r--r--src/Monolog/Handler/SendGridHandler.php2
-rw-r--r--src/Monolog/Handler/SlackHandler.php4
-rw-r--r--src/Monolog/Handler/SocketHandler.php2
-rw-r--r--src/Monolog/Handler/StreamHandler.php2
-rw-r--r--src/Monolog/Handler/SwiftMailerHandler.php15
-rw-r--r--src/Monolog/Handler/SyslogHandler.php2
-rw-r--r--src/Monolog/Handler/SyslogUdp/UdpSocket.php2
-rw-r--r--src/Monolog/Handler/SyslogUdpHandler.php2
-rw-r--r--src/Monolog/Handler/TestHandler.php2
-rw-r--r--src/Monolog/Handler/WhatFailureGroupHandler.php2
-rw-r--r--src/Monolog/Handler/ZendMonitorHandler.php3
-rw-r--r--src/Monolog/Logger.php33
-rw-r--r--src/Monolog/Processor/GitProcessor.php2
-rw-r--r--src/Monolog/Processor/IntrospectionProcessor.php2
-rw-r--r--src/Monolog/Processor/MemoryPeakUsageProcessor.php2
-rw-r--r--src/Monolog/Processor/MemoryProcessor.php2
-rw-r--r--src/Monolog/Processor/MemoryUsageProcessor.php2
-rw-r--r--src/Monolog/Processor/ProcessIdProcessor.php2
-rw-r--r--src/Monolog/Processor/PsrLogMessageProcessor.php2
-rw-r--r--src/Monolog/Processor/TagProcessor.php2
-rw-r--r--src/Monolog/Processor/UidProcessor.php2
-rw-r--r--src/Monolog/Processor/WebProcessor.php2
-rw-r--r--src/Monolog/Registry.php2
-rw-r--r--src/Monolog/Test/TestCase.php6
-rw-r--r--tests/Monolog/ErrorHandlerTest.php2
-rw-r--r--tests/Monolog/Formatter/ChromePHPFormatterTest.php2
-rw-r--r--tests/Monolog/Formatter/ElasticaFormatterTest.php2
-rw-r--r--tests/Monolog/Formatter/FlowdockFormatterTest.php2
-rw-r--r--tests/Monolog/Formatter/FluentdFormatterTest.php2
-rw-r--r--tests/Monolog/Formatter/GelfMessageFormatterTest.php4
-rw-r--r--tests/Monolog/Formatter/JsonFormatterTest.php2
-rw-r--r--tests/Monolog/Formatter/LineFormatterTest.php2
-rw-r--r--tests/Monolog/Formatter/LogglyFormatterTest.php2
-rw-r--r--tests/Monolog/Formatter/LogstashFormatterTest.php2
-rw-r--r--tests/Monolog/Formatter/MongoDBFormatterTest.php2
-rw-r--r--tests/Monolog/Formatter/NormalizerFormatterTest.php17
-rw-r--r--tests/Monolog/Formatter/ScalarFormatterTest.php2
-rw-r--r--tests/Monolog/Formatter/WildfireFormatterTest.php2
-rw-r--r--tests/Monolog/Handler/AbstractHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/AbstractProcessingHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/AmqpHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/BrowserConsoleHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/BufferHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/ChromePHPHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/CouchDBHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/DeduplicationHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/DynamoDbHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/ElasticSearchHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/ErrorLogHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/FilterHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/FingersCrossedHandlerTest.php10
-rw-r--r--tests/Monolog/Handler/FirePHPHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/FleepHookHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/FlowdockHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/GelfHandlerLegacyTest.php2
-rw-r--r--tests/Monolog/Handler/GelfHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/GelfMockMessagePublisher.php2
-rw-r--r--tests/Monolog/Handler/GroupHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/HandlerWrapperTest.php2
-rw-r--r--tests/Monolog/Handler/HipChatHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/LogEntriesHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/MailHandlerTest.php4
-rw-r--r--tests/Monolog/Handler/MockRavenClient.php2
-rw-r--r--tests/Monolog/Handler/MongoDBHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/NativeMailerHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/NewRelicHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/NullHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/PHPConsoleHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/ProcessHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/PsrHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/PushoverHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/RavenHandlerTest.php4
-rw-r--r--tests/Monolog/Handler/RedisHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/RotatingFileHandlerTest.php6
-rw-r--r--tests/Monolog/Handler/SamplingHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/SlackHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/SocketHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/StreamHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/SwiftMailerHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/SyslogHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/SyslogUdpHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/TestHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/UdpSocketTest.php2
-rw-r--r--tests/Monolog/Handler/WhatFailureGroupHandlerTest.php2
-rw-r--r--tests/Monolog/Handler/ZendMonitorHandlerTest.php3
-rw-r--r--tests/Monolog/LoggerTest.php6
-rw-r--r--tests/Monolog/Processor/GitProcessorTest.php2
-rw-r--r--tests/Monolog/Processor/IntrospectionProcessorTest.php2
-rw-r--r--tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php2
-rw-r--r--tests/Monolog/Processor/MemoryUsageProcessorTest.php2
-rw-r--r--tests/Monolog/Processor/ProcessIdProcessorTest.php2
-rw-r--r--tests/Monolog/Processor/PsrLogMessageProcessorTest.php2
-rw-r--r--tests/Monolog/Processor/TagProcessorTest.php2
-rw-r--r--tests/Monolog/Processor/UidProcessorTest.php2
-rw-r--r--tests/Monolog/Processor/WebProcessorTest.php2
-rw-r--r--tests/Monolog/PsrLogCompatTest.php2
-rw-r--r--tests/Monolog/RegistryTest.php2
-rw-r--r--tests/bootstrap.php2
170 files changed, 239 insertions, 240 deletions
diff --git a/.php_cs b/.php_cs
index e134330..b16a35e 100644
--- a/.php_cs
+++ b/.php_cs
@@ -32,7 +32,7 @@ return PhpCsFixer\Config::create()
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_blank_lines_between_uses' => true,
- 'no_duplicate_semicolons' => true,
+ 'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
diff --git a/composer.json b/composer.json
index 4d9aa73..1a6c609 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,7 @@
},
"require-dev": {
"phpunit/phpunit": "^5.3",
- "graylog2/gelf-php": "^1.0.1",
+ "graylog2/gelf-php": "1.3.x-dev",
"sentry/sentry": "^0.13",
"ruflin/elastica": ">=0.90 <3.0",
"doctrine/couchdb": "~1.0@dev",
diff --git a/src/Monolog/DateTimeImmutable.php b/src/Monolog/DateTimeImmutable.php
index f1536f4..6ca786c 100644
--- a/src/Monolog/DateTimeImmutable.php
+++ b/src/Monolog/DateTimeImmutable.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -23,11 +23,13 @@ class DateTimeImmutable extends \DateTimeImmutable implements \JsonSerializable
public function __construct($useMicroseconds, \DateTimeZone $timezone = null)
{
- $date = null;
+ $date = 'now';
if ($useMicroseconds) {
+ // Circumvent DateTimeImmutable::createFromFormat() which always returns \DateTimeImmutable instead of `static`
+ // @link https://bugs.php.net/bug.php?id=60302
$timestamp = microtime(true);
$microseconds = sprintf("%06d", ($timestamp - floor($timestamp)) * 1000000);
- $date = date('Y-m-d H:i:s.' . $microseconds, $timestamp);
+ $date = date('Y-m-d H:i:s.' . $microseconds, (int) $timestamp);
}
parent::__construct($date, $timezone);
diff --git a/src/Monolog/ErrorHandler.php b/src/Monolog/ErrorHandler.php
index 5a89939..aaf2d9b 100644
--- a/src/Monolog/ErrorHandler.php
+++ b/src/Monolog/ErrorHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/ChromePHPFormatter.php b/src/Monolog/Formatter/ChromePHPFormatter.php
index 0fda87a..12b0d60 100644
--- a/src/Monolog/Formatter/ChromePHPFormatter.php
+++ b/src/Monolog/Formatter/ChromePHPFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/ElasticaFormatter.php b/src/Monolog/Formatter/ElasticaFormatter.php
index 4c556cf..e6a5e67 100644
--- a/src/Monolog/Formatter/ElasticaFormatter.php
+++ b/src/Monolog/Formatter/ElasticaFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/FlowdockFormatter.php b/src/Monolog/Formatter/FlowdockFormatter.php
index 2d75079..6a33038 100644
--- a/src/Monolog/Formatter/FlowdockFormatter.php
+++ b/src/Monolog/Formatter/FlowdockFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/FluentdFormatter.php b/src/Monolog/Formatter/FluentdFormatter.php
index 5ce2aca..e2a6658 100644
--- a/src/Monolog/Formatter/FluentdFormatter.php
+++ b/src/Monolog/Formatter/FluentdFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/FormatterInterface.php b/src/Monolog/Formatter/FormatterInterface.php
index b5de751..7442134 100644
--- a/src/Monolog/Formatter/FormatterInterface.php
+++ b/src/Monolog/Formatter/FormatterInterface.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/GelfMessageFormatter.php b/src/Monolog/Formatter/GelfMessageFormatter.php
index 847773f..047358a 100644
--- a/src/Monolog/Formatter/GelfMessageFormatter.php
+++ b/src/Monolog/Formatter/GelfMessageFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -68,7 +68,12 @@ class GelfMessageFormatter extends NormalizerFormatter
*/
public function format(array $record)
{
- $record = parent::format($record);
+ if (isset($record['context'])) {
+ $record['context'] = parent::format($record['context']);
+ }
+ if (isset($record['extra'])) {
+ $record['extra'] = parent::format($record['extra']);
+ }
if (!isset($record['datetime'], $record['message'], $record['level'])) {
throw new \InvalidArgumentException('The record should at least contain datetime, message and level keys, '.var_export($record, true).' given');
diff --git a/src/Monolog/Formatter/HtmlFormatter.php b/src/Monolog/Formatter/HtmlFormatter.php
index 7b2d3f6..1905891 100644
--- a/src/Monolog/Formatter/HtmlFormatter.php
+++ b/src/Monolog/Formatter/HtmlFormatter.php
@@ -1,4 +1,5 @@
-<?php
+<?php declare(strict_types=1);
+
/*
* This file is part of the Monolog package.
*
@@ -87,7 +88,7 @@ class HtmlFormatter extends NormalizerFormatter
$output .= '<table cellspacing="1" width="100%" class="monolog-output">';
$output .= $this->addRow('Message', (string) $record['message']);
- $output .= $this->addRow('Time', $record['datetime']->format($this->dateFormat));
+ $output .= $this->addRow('Time', $this->formatDate($record['datetime']));
$output .= $this->addRow('Channel', $record['channel']);
if ($record['context']) {
$embeddedTable = '<table cellspacing="1" width="100%">';
diff --git a/src/Monolog/Formatter/JsonFormatter.php b/src/Monolog/Formatter/JsonFormatter.php
index 17ede7d..2c7db92 100644
--- a/src/Monolog/Formatter/JsonFormatter.php
+++ b/src/Monolog/Formatter/JsonFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/LineFormatter.php b/src/Monolog/Formatter/LineFormatter.php
index 7a94a7f..5a65b4c 100644
--- a/src/Monolog/Formatter/LineFormatter.php
+++ b/src/Monolog/Formatter/LineFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/LogglyFormatter.php b/src/Monolog/Formatter/LogglyFormatter.php
index aa1ff80..d4190df 100644
--- a/src/Monolog/Formatter/LogglyFormatter.php
+++ b/src/Monolog/Formatter/LogglyFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/LogstashFormatter.php b/src/Monolog/Formatter/LogstashFormatter.php
index de456cf..31e354c 100644
--- a/src/Monolog/Formatter/LogstashFormatter.php
+++ b/src/Monolog/Formatter/LogstashFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/MongoDBFormatter.php b/src/Monolog/Formatter/MongoDBFormatter.php
index e58cb7e..6d9456b 100644
--- a/src/Monolog/Formatter/MongoDBFormatter.php
+++ b/src/Monolog/Formatter/MongoDBFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/NormalizerFormatter.php b/src/Monolog/Formatter/NormalizerFormatter.php
index 8c060b1..50c3299 100644
--- a/src/Monolog/Formatter/NormalizerFormatter.php
+++ b/src/Monolog/Formatter/NormalizerFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -30,7 +30,7 @@ class NormalizerFormatter implements FormatterInterface
*/
public function __construct(string $dateFormat = null)
{
- $this->dateFormat = $dateFormat;
+ $this->dateFormat = null === $dateFormat ? static::SIMPLE_DATE : $dateFormat;
if (!function_exists('json_encode')) {
throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter');
}
@@ -87,11 +87,7 @@ class NormalizerFormatter implements FormatterInterface
}
if ($data instanceof \DateTimeInterface) {
- if ($data instanceof DateTimeImmutable) {
- return (string) $data;
- }
-
- return $data->format($this->dateFormat ?: static::SIMPLE_DATE);
+ return $this->formatDate($data);
}
if (is_object($data)) {
@@ -271,7 +267,9 @@ class NormalizerFormatter implements FormatterInterface
if (is_string($data) && !preg_match('//u', $data)) {
$data = preg_replace_callback(
'/[\x80-\xFF]+/',
- function ($m) { return utf8_encode($m[0]); },
+ function ($m) {
+ return utf8_encode($m[0]);
+ },
$data
);
$data = str_replace(
@@ -281,4 +279,13 @@ class NormalizerFormatter implements FormatterInterface
);
}
}
+
+ protected function formatDate(\DateTimeInterface $date)
+ {
+ if ($date instanceof DateTimeImmutable) {
+ return (string) $date;
+ }
+
+ return $date->format($this->dateFormat);
+ }
}
diff --git a/src/Monolog/Formatter/ScalarFormatter.php b/src/Monolog/Formatter/ScalarFormatter.php
index 5d345d5..fcff129 100644
--- a/src/Monolog/Formatter/ScalarFormatter.php
+++ b/src/Monolog/Formatter/ScalarFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Formatter/WildfireFormatter.php b/src/Monolog/Formatter/WildfireFormatter.php
index 4a2f1cb..3c7aea5 100644
--- a/src/Monolog/Formatter/WildfireFormatter.php
+++ b/src/Monolog/Formatter/WildfireFormatter.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/AbstractHandler.php b/src/Monolog/Handler/AbstractHandler.php
index ef6015e..ea79ec9 100644
--- a/src/Monolog/Handler/AbstractHandler.php
+++ b/src/Monolog/Handler/AbstractHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/AbstractProcessingHandler.php b/src/Monolog/Handler/AbstractProcessingHandler.php
index 49a9248..654e671 100644
--- a/src/Monolog/Handler/AbstractProcessingHandler.php
+++ b/src/Monolog/Handler/AbstractProcessingHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/AbstractSyslogHandler.php b/src/Monolog/Handler/AbstractSyslogHandler.php
index 24d8219..d6fc41e 100644
--- a/src/Monolog/Handler/AbstractSyslogHandler.php
+++ b/src/Monolog/Handler/AbstractSyslogHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -83,7 +83,7 @@ abstract class AbstractSyslogHandler extends AbstractProcessingHandler
}
// convert textual description of facility to syslog constant
- if (array_key_exists(strtolower($facility), $this->facilities)) {
+ if (is_string($facility) && array_key_exists(strtolower($facility), $this->facilities)) {
$facility = $this->facilities[strtolower($facility)];
} elseif (!in_array($facility, array_values($this->facilities), true)) {
throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given');
diff --git a/src/Monolog/Handler/AmqpHandler.php b/src/Monolog/Handler/AmqpHandler.php
index 223d6bf..5b77e4f 100644
--- a/src/Monolog/Handler/AmqpHandler.php
+++ b/src/Monolog/Handler/AmqpHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/BrowserConsoleHandler.php b/src/Monolog/Handler/BrowserConsoleHandler.php
index 59636f2..4879d24 100644
--- a/src/Monolog/Handler/BrowserConsoleHandler.php
+++ b/src/Monolog/Handler/BrowserConsoleHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/BufferHandler.php b/src/Monolog/Handler/BufferHandler.php
index e65121c..5ce6c39 100644
--- a/src/Monolog/Handler/BufferHandler.php
+++ b/src/Monolog/Handler/BufferHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/ChromePHPHandler.php b/src/Monolog/Handler/ChromePHPHandler.php
index 758ec89..31573ad 100644
--- a/src/Monolog/Handler/ChromePHPHandler.php
+++ b/src/Monolog/Handler/ChromePHPHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/CouchDBHandler.php b/src/Monolog/Handler/CouchDBHandler.php
index 4540e2c..e0603f3 100644
--- a/src/Monolog/Handler/CouchDBHandler.php
+++ b/src/Monolog/Handler/CouchDBHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -58,7 +58,7 @@ class CouchDBHandler extends AbstractProcessingHandler
],
]);
- if (false === @file_get_contents($url, null, $context)) {
+ if (false === @file_get_contents($url, false, $context)) {
throw new \RuntimeException(sprintf('Could not connect to %s', $url));
}
}
diff --git a/src/Monolog/Handler/CubeHandler.php b/src/Monolog/Handler/CubeHandler.php
index 7d831fe..ab6e007 100644
--- a/src/Monolog/Handler/CubeHandler.php
+++ b/src/Monolog/Handler/CubeHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/Curl/Util.php b/src/Monolog/Handler/Curl/Util.php
index 2ca774d..b0bec3d 100644
--- a/src/Monolog/Handler/Curl/Util.php
+++ b/src/Monolog/Handler/Curl/Util.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/DeduplicationHandler.php b/src/Monolog/Handler/DeduplicationHandler.php
index 5d95585..235b3b8 100644
--- a/src/Monolog/Handler/DeduplicationHandler.php
+++ b/src/Monolog/Handler/DeduplicationHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -144,7 +144,7 @@ class DeduplicationHandler extends BufferHandler
while (!feof($handle)) {
$log = fgets($handle);
- if (substr($log, 0, 10) >= $timestampValidity) {
+ if ($log && substr($log, 0, 10) >= $timestampValidity) {
$validLogs[] = $log;
}
}
diff --git a/src/Monolog/Handler/DoctrineCouchDBHandler.php b/src/Monolog/Handler/DoctrineCouchDBHandler.php
index 2752dd2..13a08ee 100644
--- a/src/Monolog/Handler/DoctrineCouchDBHandler.php
+++ b/src/Monolog/Handler/DoctrineCouchDBHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/DynamoDbHandler.php b/src/Monolog/Handler/DynamoDbHandler.php
index 2413924..43d4ddb 100644
--- a/src/Monolog/Handler/DynamoDbHandler.php
+++ b/src/Monolog/Handler/DynamoDbHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/ElasticSearchHandler.php b/src/Monolog/Handler/ElasticSearchHandler.php
index 64a0b41..fbb999f 100644
--- a/src/Monolog/Handler/ElasticSearchHandler.php
+++ b/src/Monolog/Handler/ElasticSearchHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/ErrorLogHandler.php b/src/Monolog/Handler/ErrorLogHandler.php
index fc89fcd..b272878 100644
--- a/src/Monolog/Handler/ErrorLogHandler.php
+++ b/src/Monolog/Handler/ErrorLogHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/FilterHandler.php b/src/Monolog/Handler/FilterHandler.php
index ff1a13d..da0634a 100644
--- a/src/Monolog/Handler/FilterHandler.php
+++ b/src/Monolog/Handler/FilterHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php
index c3e42ef..f9cab61 100644
--- a/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php
+++ b/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php
index 3f59965..63a14cb 100644
--- a/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php
+++ b/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php
index 6e63085..d0ebd84 100644
--- a/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php
+++ b/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/FingersCrossedHandler.php b/src/Monolog/Handler/FingersCrossedHandler.php
index 1991acf..f0151d1 100644
--- a/src/Monolog/Handler/FingersCrossedHandler.php
+++ b/src/Monolog/Handler/FingersCrossedHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/FirePHPHandler.php b/src/Monolog/Handler/FirePHPHandler.php
index a6bc6cf..42c78f6 100644
--- a/src/Monolog/Handler/FirePHPHandler.php
+++ b/src/Monolog/Handler/FirePHPHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/FleepHookHandler.php b/src/Monolog/Handler/FleepHookHandler.php
index 964f5f7..748100b 100644
--- a/src/Monolog/Handler/FleepHookHandler.php
+++ b/src/Monolog/Handler/FleepHookHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/FlowdockHandler.php b/src/Monolog/Handler/FlowdockHandler.php
index 2f2c3c7..b3fc9b4 100644
--- a/src/Monolog/Handler/FlowdockHandler.php
+++ b/src/Monolog/Handler/FlowdockHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/FormattableHandlerInterface.php b/src/Monolog/Handler/FormattableHandlerInterface.php
index a633dec..fc1693c 100644
--- a/src/Monolog/Handler/FormattableHandlerInterface.php
+++ b/src/Monolog/Handler/FormattableHandlerInterface.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/FormattableHandlerTrait.php b/src/Monolog/Handler/FormattableHandlerTrait.php
index 500a071..2b7e56f 100644
--- a/src/Monolog/Handler/FormattableHandlerTrait.php
+++ b/src/Monolog/Handler/FormattableHandlerTrait.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/GelfHandler.php b/src/Monolog/Handler/GelfHandler.php
index 222a895..4a6c0f8 100644
--- a/src/Monolog/Handler/GelfHandler.php
+++ b/src/Monolog/Handler/GelfHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/GroupHandler.php b/src/Monolog/Handler/GroupHandler.php
index 193465f..a6f063c 100644
--- a/src/Monolog/Handler/GroupHandler.php
+++ b/src/Monolog/Handler/GroupHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/Handler.php b/src/Monolog/Handler/Handler.php
index 6d1e7bf..347e7b7 100644
--- a/src/Monolog/Handler/Handler.php
+++ b/src/Monolog/Handler/Handler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/HandlerInterface.php b/src/Monolog/Handler/HandlerInterface.php
index 7f8ffbe..472fd31 100644
--- a/src/Monolog/Handler/HandlerInterface.php
+++ b/src/Monolog/Handler/HandlerInterface.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/HandlerWrapper.php b/src/Monolog/Handler/HandlerWrapper.php
index f79642f..5eacf00 100644
--- a/src/Monolog/Handler/HandlerWrapper.php
+++ b/src/Monolog/Handler/HandlerWrapper.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/HipChatHandler.php b/src/Monolog/Handler/HipChatHandler.php
index 8e7ab65..98441f3 100644
--- a/src/Monolog/Handler/HipChatHandler.php
+++ b/src/Monolog/Handler/HipChatHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/IFTTTHandler.php b/src/Monolog/Handler/IFTTTHandler.php
index f4dbf68..46792ee 100644
--- a/src/Monolog/Handler/IFTTTHandler.php
+++ b/src/Monolog/Handler/IFTTTHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/LogEntriesHandler.php b/src/Monolog/Handler/LogEntriesHandler.php
index 494c605..c74b9d2 100644
--- a/src/Monolog/Handler/LogEntriesHandler.php
+++ b/src/Monolog/Handler/LogEntriesHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/LogglyHandler.php b/src/Monolog/Handler/LogglyHandler.php
index 874cf70..544e7c7 100644
--- a/src/Monolog/Handler/LogglyHandler.php
+++ b/src/Monolog/Handler/LogglyHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/MailHandler.php b/src/Monolog/Handler/MailHandler.php
index 2b9d74c..634fbc1 100644
--- a/src/Monolog/Handler/MailHandler.php
+++ b/src/Monolog/Handler/MailHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -46,7 +46,7 @@ abstract class MailHandler extends AbstractProcessingHandler
* @param string $content formatted email body to be sent
* @param array $records the array of log records that formed this content
*/
- abstract protected function send($content, array $records);
+ abstract protected function send(string $content, array $records);
/**
* {@inheritdoc}
diff --git a/src/Monolog/Handler/MandrillHandler.php b/src/Monolog/Handler/MandrillHandler.php
index 1fb9dc6..68ec568 100644
--- a/src/Monolog/Handler/MandrillHandler.php
+++ b/src/Monolog/Handler/MandrillHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/MissingExtensionException.php b/src/Monolog/Handler/MissingExtensionException.php
index 4724a7e..1554b34 100644
--- a/src/Monolog/Handler/MissingExtensionException.php
+++ b/src/Monolog/Handler/MissingExtensionException.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/MongoDBHandler.php b/src/Monolog/Handler/MongoDBHandler.php
index d6ca24c..f302d31 100644
--- a/src/Monolog/Handler/MongoDBHandler.php
+++ b/src/Monolog/Handler/MongoDBHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/NativeMailerHandler.php b/src/Monolog/Handler/NativeMailerHandler.php
index 4289e35..b597761 100644
--- a/src/Monolog/Handler/NativeMailerHandler.php
+++ b/src/Monolog/Handler/NativeMailerHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -115,7 +115,7 @@ class NativeMailerHandler extends MailHandler
/**
* {@inheritdoc}
*/
- protected function send($content, array $records)
+ protected function send(string $content, array $records)
{
$contentType = $this->getContentType() ?: ($this->isHtmlBody($content) ? 'text/html' : 'text/plain');
diff --git a/src/Monolog/Handler/NewRelicHandler.php b/src/Monolog/Handler/NewRelicHandler.php
index 03952e7..fb03778 100644
--- a/src/Monolog/Handler/NewRelicHandler.php
+++ b/src/Monolog/Handler/NewRelicHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/NullHandler.php b/src/Monolog/Handler/NullHandler.php
index 3179d39..93678e8 100644
--- a/src/Monolog/Handler/NullHandler.php
+++ b/src/Monolog/Handler/NullHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/PHPConsoleHandler.php b/src/Monolog/Handler/PHPConsoleHandler.php
index 10466ad..7807a6f 100644
--- a/src/Monolog/Handler/PHPConsoleHandler.php
+++ b/src/Monolog/Handler/PHPConsoleHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/ProcessHandler.php b/src/Monolog/Handler/ProcessHandler.php
index 4c2d005..9c135f8 100644
--- a/src/Monolog/Handler/ProcessHandler.php
+++ b/src/Monolog/Handler/ProcessHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/ProcessableHandlerInterface.php b/src/Monolog/Handler/ProcessableHandlerInterface.php
index 3943967..59ec982 100644
--- a/src/Monolog/Handler/ProcessableHandlerInterface.php
+++ b/src/Monolog/Handler/ProcessableHandlerInterface.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/ProcessableHandlerTrait.php b/src/Monolog/Handler/ProcessableHandlerTrait.php
index 974f1af..d28d46b 100644
--- a/src/Monolog/Handler/ProcessableHandlerTrait.php
+++ b/src/Monolog/Handler/ProcessableHandlerTrait.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/PsrHandler.php b/src/Monolog/Handler/PsrHandler.php
index 2d61302..415b45f 100644
--- a/src/Monolog/Handler/PsrHandler.php
+++ b/src/Monolog/Handler/PsrHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/PushoverHandler.php b/src/Monolog/Handler/PushoverHandler.php
index aceff25..b53ce6c 100644
--- a/src/Monolog/Handler/PushoverHandler.php
+++ b/src/Monolog/Handler/PushoverHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/RavenHandler.php b/src/Monolog/Handler/RavenHandler.php
index a573819..db64f80 100644
--- a/src/Monolog/Handler/RavenHandler.php
+++ b/src/Monolog/Handler/RavenHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/RedisHandler.php b/src/Monolog/Handler/RedisHandler.php
index e39c2b3..f77d4fd 100644
--- a/src/Monolog/Handler/RedisHandler.php
+++ b/src/Monolog/Handler/RedisHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/RollbarHandler.php b/src/Monolog/Handler/RollbarHandler.php
index 572c40b..0a82faa 100644
--- a/src/Monolog/Handler/RollbarHandler.php
+++ b/src/Monolog/Handler/RollbarHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/RotatingFileHandler.php b/src/Monolog/Handler/RotatingFileHandler.php
index ade5941..8c99f2d 100644
--- a/src/Monolog/Handler/RotatingFileHandler.php
+++ b/src/Monolog/Handler/RotatingFileHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -134,7 +134,8 @@ class RotatingFileHandler extends StreamHandler
if (is_writable($file)) {
// suppress errors here as unlink() might fail if two processes
// are cleaning up/rotating at the same time
- set_error_handler(function ($errno, $errstr, $errfile, $errline) {});
+ set_error_handler(function ($errno, $errstr, $errfile, $errline) {
+ });
unlink($file);
restore_error_handler();
}
diff --git a/src/Monolog/Handler/SamplingHandler.php b/src/Monolog/Handler/SamplingHandler.php
index a0b784b..8a25cbb 100644
--- a/src/Monolog/Handler/SamplingHandler.php
+++ b/src/Monolog/Handler/SamplingHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/SendGridHandler.php b/src/Monolog/Handler/SendGridHandler.php
index cee6986..3a91cb4 100644
--- a/src/Monolog/Handler/SendGridHandler.php
+++ b/src/Monolog/Handler/SendGridHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/SlackHandler.php b/src/Monolog/Handler/SlackHandler.php
index 35c809a..a5db721 100644
--- a/src/Monolog/Handler/SlackHandler.php
+++ b/src/Monolog/Handler/SlackHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -92,7 +92,7 @@ class SlackHandler extends SocketHandler
$this->token = $token;
$this->channel = $channel;
$this->username = $username;
- $this->iconEmoji = trim($iconEmoji, ':');
+ $this->iconEmoji = is_string($iconEmoji) ? trim($iconEmoji, ':') : null;
$this->useAttachment = $useAttachment;
$this->useShortAttachment = $useShortAttachment;
$this->includeContextAndExtra = $includeContextAndExtra;
diff --git a/src/Monolog/Handler/SocketHandler.php b/src/Monolog/Handler/SocketHandler.php
index 7a61bf4..520bedd 100644
--- a/src/Monolog/Handler/SocketHandler.php
+++ b/src/Monolog/Handler/SocketHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/StreamHandler.php b/src/Monolog/Handler/StreamHandler.php
index 8936e67..4a7433c 100644
--- a/src/Monolog/Handler/StreamHandler.php
+++ b/src/Monolog/Handler/StreamHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/SwiftMailerHandler.php b/src/Monolog/Handler/SwiftMailerHandler.php
index 44026fc..549246d 100644
--- a/src/Monolog/Handler/SwiftMailerHandler.php
+++ b/src/Monolog/Handler/SwiftMailerHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -13,6 +13,7 @@ namespace Monolog\Handler;
use Monolog\Logger;
use Monolog\Formatter\LineFormatter;
+use Swift_Message;
/**
* SwiftMailerHandler uses Swift_Mailer to send the emails
@@ -26,7 +27,7 @@ class SwiftMailerHandler extends MailHandler
/**
* @param \Swift_Mailer $mailer The mailer to use
- * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced
+ * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced
* @param int $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
*/
@@ -41,7 +42,7 @@ class SwiftMailerHandler extends MailHandler
/**
* {@inheritdoc}
*/
- protected function send($content, array $records)
+ protected function send(string $content, array $records)
{
$this->mailer->send($this->buildMessage($content, $records));
}
@@ -51,19 +52,19 @@ class SwiftMailerHandler extends MailHandler
*
* @param string $content formatted email body to be sent
* @param array $records Log records that formed the content
- * @return \Swift_Message
+ * @return Swift_Message
*/
- protected function buildMessage($content, array $records)
+ protected function buildMessage(string $content, array $records): Swift_Message
{
$message = null;
- if ($this->messageTemplate instanceof \Swift_Message) {
+ if ($this->messageTemplate instanceof Swift_Message) {
$message = clone $this->messageTemplate;
$message->generateId();
} elseif (is_callable($this->messageTemplate)) {
$message = call_user_func($this->messageTemplate, $content, $records);
}
- if (!$message instanceof \Swift_Message) {
+ if (!$message instanceof Swift_Message) {
throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it');
}
diff --git a/src/Monolog/Handler/SyslogHandler.php b/src/Monolog/Handler/SyslogHandler.php
index 376bc3b..863fc56 100644
--- a/src/Monolog/Handler/SyslogHandler.php
+++ b/src/Monolog/Handler/SyslogHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/src/Monolog/Handler/SyslogUdp/UdpSocket.php
index 3bff085..f54ac4e 100644
--- a/src/Monolog/Handler/SyslogUdp/UdpSocket.php
+++ b/src/Monolog/Handler/SyslogUdp/UdpSocket.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/SyslogUdpHandler.php b/src/Monolog/Handler/SyslogUdpHandler.php
index b175cc3..4e2335d 100644
--- a/src/Monolog/Handler/SyslogUdpHandler.php
+++ b/src/Monolog/Handler/SyslogUdpHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/TestHandler.php b/src/Monolog/Handler/TestHandler.php
index b34ebaa..db63565 100644
--- a/src/Monolog/Handler/TestHandler.php
+++ b/src/Monolog/Handler/TestHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/WhatFailureGroupHandler.php b/src/Monolog/Handler/WhatFailureGroupHandler.php
index 6dbfa81..42c2336 100644
--- a/src/Monolog/Handler/WhatFailureGroupHandler.php
+++ b/src/Monolog/Handler/WhatFailureGroupHandler.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Handler/ZendMonitorHandler.php b/src/Monolog/Handler/ZendMonitorHandler.php
index 6d77122..c0bceb4 100644
--- a/src/Monolog/Handler/ZendMonitorHandler.php
+++ b/src/Monolog/Handler/ZendMonitorHandler.php
@@ -1,4 +1,5 @@
-<?php
+<?php declare(strict_types=1);
+
/*
* This file is part of the Monolog package.
*
diff --git a/src/Monolog/Logger.php b/src/Monolog/Logger.php
index 3016ba5..3878f59 100644
--- a/src/Monolog/Logger.php
+++ b/src/Monolog/Logger.php
@@ -1,15 +1,4 @@
-<?php
-
-/*
- * This file is part of the Monolog package.
- *
- * (c) Jordi Boggiano <j.boggiano@seld.be>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-declare(strict_types=1);
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -173,7 +162,7 @@ class Logger implements LoggerInterface
*
* @return static
*/
- public function withName($name)
+ public function withName(string $name): self
{
$new = clone $this;
$new->name = $name;
@@ -315,7 +304,8 @@ class Logger implements LoggerInterface
return false;
}
- $ts = $this->createDateTime();
+ $dateTime = new DateTimeImmutable($this->microsecondTimestamps, $this->timezone);
+ $dateTime->setTimezone($this->timezone);
$record = [
'message' => $message,
@@ -323,7 +313,7 @@ class Logger implements LoggerInterface
'level' => $level,
'level_name' => $levelName,
'channel' => $this->name,
- 'datetime' => $ts,
+ 'datetime' => $dateTime,
'extra' => [],
];
@@ -555,17 +545,4 @@ class Logger implements LoggerInterface
{
return $this->timezone;
}
-
- /**
- * Circumvent DateTimeImmutable::createFromFormat() which always returns the native DateTime instead of the specialized one
- *
- * @link https://bugs.php.net/bug.php?id=60302
- */
- private function createDateTime(): DateTimeImmutable
- {
- $dateTime = new DateTimeImmutable($this->microsecondTimestamps, $this->timezone);
- $dateTime->setTimezone($this->timezone);
-
- return $dateTime;
- }
}
diff --git a/src/Monolog/Processor/GitProcessor.php b/src/Monolog/Processor/GitProcessor.php
index c4d95a9..cf16be8 100644
--- a/src/Monolog/Processor/GitProcessor.php
+++ b/src/Monolog/Processor/GitProcessor.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Processor/IntrospectionProcessor.php b/src/Monolog/Processor/IntrospectionProcessor.php
index bec43c3..59e2f48 100644
--- a/src/Monolog/Processor/IntrospectionProcessor.php
+++ b/src/Monolog/Processor/IntrospectionProcessor.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/src/Monolog/Processor/MemoryPeakUsageProcessor.php
index 0543e92..b8fd91c 100644
--- a/src/Monolog/Processor/MemoryPeakUsageProcessor.php
+++ b/src/Monolog/Processor/MemoryPeakUsageProcessor.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Processor/MemoryProcessor.php b/src/Monolog/Processor/MemoryProcessor.php
index 85f9dc5..460caa6 100644
--- a/src/Monolog/Processor/MemoryProcessor.php
+++ b/src/Monolog/Processor/MemoryProcessor.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Processor/MemoryUsageProcessor.php b/src/Monolog/Processor/MemoryUsageProcessor.php
index 2783d65..cb6b2ea 100644
--- a/src/Monolog/Processor/MemoryUsageProcessor.php
+++ b/src/Monolog/Processor/MemoryUsageProcessor.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Processor/ProcessIdProcessor.php b/src/Monolog/Processor/ProcessIdProcessor.php
index 9d3f559..7ddafea 100644
--- a/src/Monolog/Processor/ProcessIdProcessor.php
+++ b/src/Monolog/Processor/ProcessIdProcessor.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Processor/PsrLogMessageProcessor.php b/src/Monolog/Processor/PsrLogMessageProcessor.php
index fd907a1..e1a42cd 100644
--- a/src/Monolog/Processor/PsrLogMessageProcessor.php
+++ b/src/Monolog/Processor/PsrLogMessageProcessor.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Processor/TagProcessor.php b/src/Monolog/Processor/TagProcessor.php
index a5f1e7a..19458e2 100644
--- a/src/Monolog/Processor/TagProcessor.php
+++ b/src/Monolog/Processor/TagProcessor.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Processor/UidProcessor.php b/src/Monolog/Processor/UidProcessor.php
index 812707c..891e9df 100644
--- a/src/Monolog/Processor/UidProcessor.php
+++ b/src/Monolog/Processor/UidProcessor.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Processor/WebProcessor.php b/src/Monolog/Processor/WebProcessor.php
index 50e7ca3..91abeec 100644
--- a/src/Monolog/Processor/WebProcessor.php
+++ b/src/Monolog/Processor/WebProcessor.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Registry.php b/src/Monolog/Registry.php
index 587ec16..64612c8 100644
--- a/src/Monolog/Registry.php
+++ b/src/Monolog/Registry.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/src/Monolog/Test/TestCase.php b/src/Monolog/Test/TestCase.php
index fab3dee..7cb7fbf 100644
--- a/src/Monolog/Test/TestCase.php
+++ b/src/Monolog/Test/TestCase.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -59,7 +59,9 @@ class TestCase extends \PHPUnit_Framework_TestCase
$formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface');
$formatter->expects($this->any())
->method('format')
- ->will($this->returnCallback(function ($record) { return $record['message']; }));
+ ->will($this->returnCallback(function ($record) {
+ return $record['message'];
+ }));
return $formatter;
}
diff --git a/tests/Monolog/ErrorHandlerTest.php b/tests/Monolog/ErrorHandlerTest.php
index 26ac7ea..7b3ba82 100644
--- a/tests/Monolog/ErrorHandlerTest.php
+++ b/tests/Monolog/ErrorHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/ChromePHPFormatterTest.php b/tests/Monolog/Formatter/ChromePHPFormatterTest.php
index a6bb96a..08a8e1b 100644
--- a/tests/Monolog/Formatter/ChromePHPFormatterTest.php
+++ b/tests/Monolog/Formatter/ChromePHPFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/ElasticaFormatterTest.php b/tests/Monolog/Formatter/ElasticaFormatterTest.php
index 17c43d5..8e88e69 100644
--- a/tests/Monolog/Formatter/ElasticaFormatterTest.php
+++ b/tests/Monolog/Formatter/ElasticaFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/FlowdockFormatterTest.php b/tests/Monolog/Formatter/FlowdockFormatterTest.php
index cf5b416..f922d53 100644
--- a/tests/Monolog/Formatter/FlowdockFormatterTest.php
+++ b/tests/Monolog/Formatter/FlowdockFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/FluentdFormatterTest.php b/tests/Monolog/Formatter/FluentdFormatterTest.php
index 828a396..0be8d8f 100644
--- a/tests/Monolog/Formatter/FluentdFormatterTest.php
+++ b/tests/Monolog/Formatter/FluentdFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/GelfMessageFormatterTest.php b/tests/Monolog/Formatter/GelfMessageFormatterTest.php
index 2b61387..897aa81 100644
--- a/tests/Monolog/Formatter/GelfMessageFormatterTest.php
+++ b/tests/Monolog/Formatter/GelfMessageFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -216,7 +216,7 @@ class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase
$length = 200;
foreach ($messageArray as $key => $value) {
- if (!in_array($key, ['level', 'timestamp'])) {
+ if (!in_array($key, ['level', 'timestamp']) && is_string($value)) {
$length += strlen($value);
}
}
diff --git a/tests/Monolog/Formatter/JsonFormatterTest.php b/tests/Monolog/Formatter/JsonFormatterTest.php
index 2a0b8d1..392647f 100644
--- a/tests/Monolog/Formatter/JsonFormatterTest.php
+++ b/tests/Monolog/Formatter/JsonFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/LineFormatterTest.php b/tests/Monolog/Formatter/LineFormatterTest.php
index efb90b6..cbbbc66 100644
--- a/tests/Monolog/Formatter/LineFormatterTest.php
+++ b/tests/Monolog/Formatter/LineFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/LogglyFormatterTest.php b/tests/Monolog/Formatter/LogglyFormatterTest.php
index ce5251b..26d6fa1 100644
--- a/tests/Monolog/Formatter/LogglyFormatterTest.php
+++ b/tests/Monolog/Formatter/LogglyFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/LogstashFormatterTest.php b/tests/Monolog/Formatter/LogstashFormatterTest.php
index ed45100..57d6759 100644
--- a/tests/Monolog/Formatter/LogstashFormatterTest.php
+++ b/tests/Monolog/Formatter/LogstashFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/MongoDBFormatterTest.php b/tests/Monolog/Formatter/MongoDBFormatterTest.php
index a66cedf..2933497 100644
--- a/tests/Monolog/Formatter/MongoDBFormatterTest.php
+++ b/tests/Monolog/Formatter/MongoDBFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/NormalizerFormatterTest.php b/tests/Monolog/Formatter/NormalizerFormatterTest.php
index 4d929c7..a3e0ef6 100644
--- a/tests/Monolog/Formatter/NormalizerFormatterTest.php
+++ b/tests/Monolog/Formatter/NormalizerFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -273,18 +273,14 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
];
}
+ // This happens i.e. in React promises or Guzzle streams where stream wrappers are registered
+ // and no file or line are included in the trace because it's treated as internal function
public function testExceptionTraceWithArgs()
{
if (defined('HHVM_VERSION')) {
$this->markTestSkipped('Not supported in HHVM since it detects errors differently');
}
- // This happens i.e. in React promises or Guzzle streams where stream wrappers are registered
- // and no file or line are included in the trace because it's treated as internal function
- set_error_handler(function ($errno, $errstr, $errfile, $errline) {
- throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
- });
-
try {
// This will contain $resource and $wrappedResource as arguments in the trace item
$resource = fopen('php://memory', 'rw+');
@@ -292,9 +288,12 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
$wrappedResource = new TestFooNorm;
$wrappedResource->foo = $resource;
// Just do something stupid with a resource/wrapped resource as argument
- array_keys($wrappedResource);
+ $arr = [$wrappedResource, null];
+ // modifying the array inside throws a "usort(): Array was modified by the user comparison function"
+ usort($arr, function ($a, $b) use (&$arr) {
+ $arr[] = 'new';
+ });
} catch (\Throwable $e) {
- restore_error_handler();
}
$formatter = new NormalizerFormatter();
diff --git a/tests/Monolog/Formatter/ScalarFormatterTest.php b/tests/Monolog/Formatter/ScalarFormatterTest.php
index 73707d9..ea488e5 100644
--- a/tests/Monolog/Formatter/ScalarFormatterTest.php
+++ b/tests/Monolog/Formatter/ScalarFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Formatter/WildfireFormatterTest.php b/tests/Monolog/Formatter/WildfireFormatterTest.php
index 0de8fd5..40ee82c 100644
--- a/tests/Monolog/Formatter/WildfireFormatterTest.php
+++ b/tests/Monolog/Formatter/WildfireFormatterTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/AbstractHandlerTest.php b/tests/Monolog/Handler/AbstractHandlerTest.php
index 2cbcdcf..b7451a7 100644
--- a/tests/Monolog/Handler/AbstractHandlerTest.php
+++ b/tests/Monolog/Handler/AbstractHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/AbstractProcessingHandlerTest.php b/tests/Monolog/Handler/AbstractProcessingHandlerTest.php
index 435e770..58d0920 100644
--- a/tests/Monolog/Handler/AbstractProcessingHandlerTest.php
+++ b/tests/Monolog/Handler/AbstractProcessingHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/AmqpHandlerTest.php b/tests/Monolog/Handler/AmqpHandlerTest.php
index 9a41c39..c70e162 100644
--- a/tests/Monolog/Handler/AmqpHandlerTest.php
+++ b/tests/Monolog/Handler/AmqpHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/BrowserConsoleHandlerTest.php b/tests/Monolog/Handler/BrowserConsoleHandlerTest.php
index 2ee66a8..048ee1c 100644
--- a/tests/Monolog/Handler/BrowserConsoleHandlerTest.php
+++ b/tests/Monolog/Handler/BrowserConsoleHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/BufferHandlerTest.php b/tests/Monolog/Handler/BufferHandlerTest.php
index 391c237..f1338b4 100644
--- a/tests/Monolog/Handler/BufferHandlerTest.php
+++ b/tests/Monolog/Handler/BufferHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/ChromePHPHandlerTest.php b/tests/Monolog/Handler/ChromePHPHandlerTest.php
index ac5e7c4..c79818c 100644
--- a/tests/Monolog/Handler/ChromePHPHandlerTest.php
+++ b/tests/Monolog/Handler/ChromePHPHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/CouchDBHandlerTest.php b/tests/Monolog/Handler/CouchDBHandlerTest.php
index b0d6ade..f89a130 100644
--- a/tests/Monolog/Handler/CouchDBHandlerTest.php
+++ b/tests/Monolog/Handler/CouchDBHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/DeduplicationHandlerTest.php b/tests/Monolog/Handler/DeduplicationHandlerTest.php
index 6b9fdfd..491fd85 100644
--- a/tests/Monolog/Handler/DeduplicationHandlerTest.php
+++ b/tests/Monolog/Handler/DeduplicationHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php b/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php
index 05f8bf7..f72f323 100644
--- a/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php
+++ b/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/DynamoDbHandlerTest.php b/tests/Monolog/Handler/DynamoDbHandlerTest.php
index cc99ad6..652dc96 100644
--- a/tests/Monolog/Handler/DynamoDbHandlerTest.php
+++ b/tests/Monolog/Handler/DynamoDbHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/ElasticSearchHandlerTest.php b/tests/Monolog/Handler/ElasticSearchHandlerTest.php
index 9ebf062..c92a72b 100644
--- a/tests/Monolog/Handler/ElasticSearchHandlerTest.php
+++ b/tests/Monolog/Handler/ElasticSearchHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/ErrorLogHandlerTest.php b/tests/Monolog/Handler/ErrorLogHandlerTest.php
index 66616ad..d230fb1 100644
--- a/tests/Monolog/Handler/ErrorLogHandlerTest.php
+++ b/tests/Monolog/Handler/ErrorLogHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/FilterHandlerTest.php b/tests/Monolog/Handler/FilterHandlerTest.php
index c45e3c1..0e64e76 100644
--- a/tests/Monolog/Handler/FilterHandlerTest.php
+++ b/tests/Monolog/Handler/FilterHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/FingersCrossedHandlerTest.php b/tests/Monolog/Handler/FingersCrossedHandlerTest.php
index 26fbec8..5b25a36 100644
--- a/tests/Monolog/Handler/FingersCrossedHandlerTest.php
+++ b/tests/Monolog/Handler/FingersCrossedHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -114,8 +114,8 @@ class FingersCrossedHandlerTest extends TestCase
{
$test = new TestHandler();
$handler = new FingersCrossedHandler(function ($record, $handler) use ($test) {
- return $test;
- });
+ return $test;
+ });
$handler->handle($this->getRecord(Logger::DEBUG));
$handler->handle($this->getRecord(Logger::INFO));
$this->assertFalse($test->hasDebugRecords());
@@ -133,8 +133,8 @@ class FingersCrossedHandlerTest extends TestCase
public function testHandleWithBadCallbackThrowsException()
{
$handler = new FingersCrossedHandler(function ($record, $handler) {
- return 'foo';
- });
+ return 'foo';
+ });
$handler->handle($this->getRecord(Logger::WARNING));
}
diff --git a/tests/Monolog/Handler/FirePHPHandlerTest.php b/tests/Monolog/Handler/FirePHPHandlerTest.php
index bb30fdb..b62e7fd 100644
--- a/tests/Monolog/Handler/FirePHPHandlerTest.php
+++ b/tests/Monolog/Handler/FirePHPHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/FleepHookHandlerTest.php b/tests/Monolog/Handler/FleepHookHandlerTest.php
index 26946b1..11b5a65 100644
--- a/tests/Monolog/Handler/FleepHookHandlerTest.php
+++ b/tests/Monolog/Handler/FleepHookHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/FlowdockHandlerTest.php b/tests/Monolog/Handler/FlowdockHandlerTest.php
index 4d8d0a4..8df847a 100644
--- a/tests/Monolog/Handler/FlowdockHandlerTest.php
+++ b/tests/Monolog/Handler/FlowdockHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/GelfHandlerLegacyTest.php b/tests/Monolog/Handler/GelfHandlerLegacyTest.php
index 02a234d..00150a1 100644
--- a/tests/Monolog/Handler/GelfHandlerLegacyTest.php
+++ b/tests/Monolog/Handler/GelfHandlerLegacyTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/GelfHandlerTest.php b/tests/Monolog/Handler/GelfHandlerTest.php
index e1b4f7a..bc06fa3 100644
--- a/tests/Monolog/Handler/GelfHandlerTest.php
+++ b/tests/Monolog/Handler/GelfHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/GelfMockMessagePublisher.php b/tests/Monolog/Handler/GelfMockMessagePublisher.php
index 873d92f..b1e94ed 100644
--- a/tests/Monolog/Handler/GelfMockMessagePublisher.php
+++ b/tests/Monolog/Handler/GelfMockMessagePublisher.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/GroupHandlerTest.php b/tests/Monolog/Handler/GroupHandlerTest.php
index 4d7c65c..0e3b9bb 100644
--- a/tests/Monolog/Handler/GroupHandlerTest.php
+++ b/tests/Monolog/Handler/GroupHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/HandlerWrapperTest.php b/tests/Monolog/Handler/HandlerWrapperTest.php
index b27c009..4a34741 100644
--- a/tests/Monolog/Handler/HandlerWrapperTest.php
+++ b/tests/Monolog/Handler/HandlerWrapperTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/HipChatHandlerTest.php b/tests/Monolog/Handler/HipChatHandlerTest.php
index d95e188..0d2e8c0 100644
--- a/tests/Monolog/Handler/HipChatHandlerTest.php
+++ b/tests/Monolog/Handler/HipChatHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/LogEntriesHandlerTest.php b/tests/Monolog/Handler/LogEntriesHandlerTest.php
index a917e51..b6d2924 100644
--- a/tests/Monolog/Handler/LogEntriesHandlerTest.php
+++ b/tests/Monolog/Handler/LogEntriesHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/MailHandlerTest.php b/tests/Monolog/Handler/MailHandlerTest.php
index c489e26..ee686ad 100644
--- a/tests/Monolog/Handler/MailHandlerTest.php
+++ b/tests/Monolog/Handler/MailHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -25,7 +25,7 @@ class MailHandlerTest extends TestCase
$formatter->expects($this->once())
->method('formatBatch'); // Each record is formatted
- $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler');
+ $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler', [], '', true, true, true, ['send', 'write']);
$handler->expects($this->once())
->method('send');
$handler->expects($this->never())
diff --git a/tests/Monolog/Handler/MockRavenClient.php b/tests/Monolog/Handler/MockRavenClient.php
index a083322..d344d34 100644
--- a/tests/Monolog/Handler/MockRavenClient.php
+++ b/tests/Monolog/Handler/MockRavenClient.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/MongoDBHandlerTest.php b/tests/Monolog/Handler/MongoDBHandlerTest.php
index 0cddea3..7333ef6 100644
--- a/tests/Monolog/Handler/MongoDBHandlerTest.php
+++ b/tests/Monolog/Handler/MongoDBHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/NativeMailerHandlerTest.php b/tests/Monolog/Handler/NativeMailerHandlerTest.php
index 9ac08be..d4aef95 100644
--- a/tests/Monolog/Handler/NativeMailerHandlerTest.php
+++ b/tests/Monolog/Handler/NativeMailerHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/NewRelicHandlerTest.php b/tests/Monolog/Handler/NewRelicHandlerTest.php
index 7471003..a71bbf8 100644
--- a/tests/Monolog/Handler/NewRelicHandlerTest.php
+++ b/tests/Monolog/Handler/NewRelicHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/NullHandlerTest.php b/tests/Monolog/Handler/NullHandlerTest.php
index 89c6639..b7e482b 100644
--- a/tests/Monolog/Handler/NullHandlerTest.php
+++ b/tests/Monolog/Handler/NullHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/PHPConsoleHandlerTest.php b/tests/Monolog/Handler/PHPConsoleHandlerTest.php
index ffdb0c6..0836b99 100644
--- a/tests/Monolog/Handler/PHPConsoleHandlerTest.php
+++ b/tests/Monolog/Handler/PHPConsoleHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/ProcessHandlerTest.php b/tests/Monolog/Handler/ProcessHandlerTest.php
index 9b739e1..011c7c5 100644
--- a/tests/Monolog/Handler/ProcessHandlerTest.php
+++ b/tests/Monolog/Handler/ProcessHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/PsrHandlerTest.php b/tests/Monolog/Handler/PsrHandlerTest.php
index 7a04bb3..6398809 100644
--- a/tests/Monolog/Handler/PsrHandlerTest.php
+++ b/tests/Monolog/Handler/PsrHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/PushoverHandlerTest.php b/tests/Monolog/Handler/PushoverHandlerTest.php
index b4ca524..e5336ab 100644
--- a/tests/Monolog/Handler/PushoverHandlerTest.php
+++ b/tests/Monolog/Handler/PushoverHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/RavenHandlerTest.php b/tests/Monolog/Handler/RavenHandlerTest.php
index ca3e8ac..d4325e5 100644
--- a/tests/Monolog/Handler/RavenHandlerTest.php
+++ b/tests/Monolog/Handler/RavenHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -189,7 +189,7 @@ class RavenHandlerTest extends TestCase
$this->getRecord(Logger::INFO, 'information'),
];
- $handler = $this->getMock('Monolog\Handler\RavenHandler', null, [$this->getRavenClient()]);
+ $handler = $this->getMock('Monolog\Handler\RavenHandler', ['handle'], [$this->getRavenClient()]);
$handler->expects($this->never())->method('handle');
$handler->setLevel(Logger::ERROR);
$handler->handleBatch($records);
diff --git a/tests/Monolog/Handler/RedisHandlerTest.php b/tests/Monolog/Handler/RedisHandlerTest.php
index 57bfb34..8363c9a 100644
--- a/tests/Monolog/Handler/RedisHandlerTest.php
+++ b/tests/Monolog/Handler/RedisHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/RotatingFileHandlerTest.php b/tests/Monolog/Handler/RotatingFileHandlerTest.php
index 3f91f17..13b8a4c 100644
--- a/tests/Monolog/Handler/RotatingFileHandlerTest.php
+++ b/tests/Monolog/Handler/RotatingFileHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -111,10 +111,10 @@ class RotatingFileHandlerTest extends TestCase
return $now + 86400 * $ago;
};
$monthCallback = function ($ago) {
- return gmmktime(0, 0, 0, date('n') + $ago, date('d'), date('Y'));
+ return gmmktime(0, 0, 0, (int) (date('n') + $ago), (int) date('d'), (int) date('Y'));
};
$yearCallback = function ($ago) {
- return gmmktime(0, 0, 0, date('n'), date('d'), date('Y') + $ago);
+ return gmmktime(0, 0, 0, (int) date('n'), (int) date('d'), (int) (date('Y') + $ago));
};
return [
diff --git a/tests/Monolog/Handler/SamplingHandlerTest.php b/tests/Monolog/Handler/SamplingHandlerTest.php
index 55637c6..90f5c9b 100644
--- a/tests/Monolog/Handler/SamplingHandlerTest.php
+++ b/tests/Monolog/Handler/SamplingHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/SlackHandlerTest.php b/tests/Monolog/Handler/SlackHandlerTest.php
index 3cbb7e4..d42c19b 100644
--- a/tests/Monolog/Handler/SlackHandlerTest.php
+++ b/tests/Monolog/Handler/SlackHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/SocketHandlerTest.php b/tests/Monolog/Handler/SocketHandlerTest.php
index 5aaead6..4574859 100644
--- a/tests/Monolog/Handler/SocketHandlerTest.php
+++ b/tests/Monolog/Handler/SocketHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/StreamHandlerTest.php b/tests/Monolog/Handler/StreamHandlerTest.php
index b0d7d7f..377e296 100644
--- a/tests/Monolog/Handler/StreamHandlerTest.php
+++ b/tests/Monolog/Handler/StreamHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/SwiftMailerHandlerTest.php b/tests/Monolog/Handler/SwiftMailerHandlerTest.php
index 64ad088..ec7fc21 100644
--- a/tests/Monolog/Handler/SwiftMailerHandlerTest.php
+++ b/tests/Monolog/Handler/SwiftMailerHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/SyslogHandlerTest.php b/tests/Monolog/Handler/SyslogHandlerTest.php
index 8f9e46b..dd31f53 100644
--- a/tests/Monolog/Handler/SyslogHandlerTest.php
+++ b/tests/Monolog/Handler/SyslogHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/SyslogUdpHandlerTest.php b/tests/Monolog/Handler/SyslogUdpHandlerTest.php
index df3b16b..25d7c58 100644
--- a/tests/Monolog/Handler/SyslogUdpHandlerTest.php
+++ b/tests/Monolog/Handler/SyslogUdpHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/TestHandlerTest.php b/tests/Monolog/Handler/TestHandlerTest.php
index 9b12d36..4fa20bb 100644
--- a/tests/Monolog/Handler/TestHandlerTest.php
+++ b/tests/Monolog/Handler/TestHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/UdpSocketTest.php b/tests/Monolog/Handler/UdpSocketTest.php
index 200857a..de0f7fb 100644
--- a/tests/Monolog/Handler/UdpSocketTest.php
+++ b/tests/Monolog/Handler/UdpSocketTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php b/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php
index d763ecb..60f5175 100644
--- a/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php
+++ b/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Handler/ZendMonitorHandlerTest.php b/tests/Monolog/Handler/ZendMonitorHandlerTest.php
index 999ad1d..4879ebe 100644
--- a/tests/Monolog/Handler/ZendMonitorHandlerTest.php
+++ b/tests/Monolog/Handler/ZendMonitorHandlerTest.php
@@ -1,4 +1,5 @@
-<?php
+<?php declare(strict_types=1);
+
/*
* This file is part of the Monolog package.
*
diff --git a/tests/Monolog/LoggerTest.php b/tests/Monolog/LoggerTest.php
index 005eeb2..75c2dbd 100644
--- a/tests/Monolog/LoggerTest.php
+++ b/tests/Monolog/LoggerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -487,7 +487,9 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
public function setTimezoneProvider()
{
return array_map(
- function ($tz) { return [new \DateTimeZone($tz)]; },
+ function ($tz) {
+ return [new \DateTimeZone($tz)];
+ },
\DateTimeZone::listIdentifiers()
);
}
diff --git a/tests/Monolog/Processor/GitProcessorTest.php b/tests/Monolog/Processor/GitProcessorTest.php
index 2dc9ae7..0059e6d 100644
--- a/tests/Monolog/Processor/GitProcessorTest.php
+++ b/tests/Monolog/Processor/GitProcessorTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Processor/IntrospectionProcessorTest.php b/tests/Monolog/Processor/IntrospectionProcessorTest.php
index 38793ef..5f5d9ae 100644
--- a/tests/Monolog/Processor/IntrospectionProcessorTest.php
+++ b/tests/Monolog/Processor/IntrospectionProcessorTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php b/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php
index 1893e66..cd80527 100644
--- a/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php
+++ b/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Processor/MemoryUsageProcessorTest.php b/tests/Monolog/Processor/MemoryUsageProcessorTest.php
index 8229a48..a4809cb 100644
--- a/tests/Monolog/Processor/MemoryUsageProcessorTest.php
+++ b/tests/Monolog/Processor/MemoryUsageProcessorTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Processor/ProcessIdProcessorTest.php b/tests/Monolog/Processor/ProcessIdProcessorTest.php
index f20ce9e..ec39e8e 100644
--- a/tests/Monolog/Processor/ProcessIdProcessorTest.php
+++ b/tests/Monolog/Processor/ProcessIdProcessorTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Processor/PsrLogMessageProcessorTest.php b/tests/Monolog/Processor/PsrLogMessageProcessorTest.php
index af36637..77db842 100644
--- a/tests/Monolog/Processor/PsrLogMessageProcessorTest.php
+++ b/tests/Monolog/Processor/PsrLogMessageProcessorTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Processor/TagProcessorTest.php b/tests/Monolog/Processor/TagProcessorTest.php
index ec514d7..da84378 100644
--- a/tests/Monolog/Processor/TagProcessorTest.php
+++ b/tests/Monolog/Processor/TagProcessorTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Processor/UidProcessorTest.php b/tests/Monolog/Processor/UidProcessorTest.php
index 7cb6365..927d564 100644
--- a/tests/Monolog/Processor/UidProcessorTest.php
+++ b/tests/Monolog/Processor/UidProcessorTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/Processor/WebProcessorTest.php b/tests/Monolog/Processor/WebProcessorTest.php
index abaa1ae..6da6ab8 100644
--- a/tests/Monolog/Processor/WebProcessorTest.php
+++ b/tests/Monolog/Processor/WebProcessorTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/PsrLogCompatTest.php b/tests/Monolog/PsrLogCompatTest.php
index ab89944..a4bbcd0 100644
--- a/tests/Monolog/PsrLogCompatTest.php
+++ b/tests/Monolog/PsrLogCompatTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/Monolog/RegistryTest.php b/tests/Monolog/RegistryTest.php
index f1d1aba..ef4e452 100644
--- a/tests/Monolog/RegistryTest.php
+++ b/tests/Monolog/RegistryTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index ab5efb7..d475dd3 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.