Skip to content

Commit 6ba773c

Browse files
committed
Deprecation detect for PHPStan installed
1 parent 7740305 commit 6ba773c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"smeghead/php-class-diagram": "^1.4",
2020
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
2121
"wp-coding-standards/wpcs": "^3.1",
22-
"phpcompatibility/phpcompatibility-wp": "^2.1"
22+
"phpcompatibility/phpcompatibility-wp": "^2.1",
23+
"phpstan/phpstan-deprecation-rules": "^1.2"
2324
},
2425
"autoload": {
2526
"psr-4": {

includes/Logs/LogFactory.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace lloc\Nowpayments\Logs;
44

55
use Monolog\Handler\StreamHandler;
6+
use Monolog\Level;
67
use Monolog\Logger;
78

89
class LogFactory {
@@ -15,10 +16,10 @@ class LogFactory {
1516
public static function get_logger(): Logger {
1617
$formatter = new StructuredLogsFormatter();
1718

18-
$debug_handler = new StreamHandler( 'php://stdout', Logger::DEBUG );
19+
$debug_handler = new StreamHandler( 'php://stdout', Level::Debug );
1920
$debug_handler->setFormatter( $formatter );
2021

21-
$error_handler = new StreamHandler( 'php://stderr', Logger::NOTICE );
22+
$error_handler = new StreamHandler( 'php://stderr', Level::Notice );
2223
$error_handler->setFormatter( $formatter );
2324

2425
$logger = new Logger( self::NAME );

0 commit comments

Comments
 (0)