1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-07 13:46:38 +02:00

Merge pull request #1254 from gmponos/remove_check_php_ver

Remove not needed checks for PHP version
This commit is contained in:
Jordi Boggiano
2018-12-26 15:29:46 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -89,7 +89,7 @@ class NewRelicHandler extends AbstractProcessingHandler
unset($record['formatted']['context']['transaction_name']); unset($record['formatted']['context']['transaction_name']);
} }
if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) {
newrelic_notice_error($record['message'], $record['context']['exception']); newrelic_notice_error($record['message'], $record['context']['exception']);
unset($record['formatted']['context']['exception']); unset($record['formatted']['context']['exception']);
} else { } else {

View File

@@ -573,7 +573,7 @@ class LoggerTest extends \PHPUnit\Framework\TestCase
// this has a very small chance of a false negative (1/10^6) // this has a very small chance of a false negative (1/10^6)
'with microseconds' => [true, 'assertNotSame', 'Y-m-d\TH:i:s.uP'], 'with microseconds' => [true, 'assertNotSame', 'Y-m-d\TH:i:s.uP'],
// php 7.1 always includes microseconds, so we keep them in, but we format the datetime without // php 7.1 always includes microseconds, so we keep them in, but we format the datetime without
'without microseconds' => [false, PHP_VERSION_ID >= 70100 ? 'assertNotSame' : 'assertSame', 'Y-m-d\TH:i:sP'], 'without microseconds' => [false, 'assertNotSame', 'Y-m-d\TH:i:sP'],
]; ];
} }