From 879d35c446b7ee54df9dbdb290991edcba635292 Mon Sep 17 00:00:00 2001 From: Zachary Craig Date: Mon, 4 May 2020 09:46:26 -0400 Subject: [PATCH 1/3] Monolog 2.x availability. New Requirement: PHP 7.2+ --- composer.json | 7 +++---- lib/SteamCondenser.php | 7 +++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 25a1d91..0c137bd 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "koraktor/steam-condenser", - "version": "1.3.10", + "version": "1.3.11", "description": "The Steam Condenser is a library for querying the Steam Community, Source and GoldSrc game servers", "keywords": [ "steam", "query", "source", "goldsrc", "community", "webapi" ], "homepage": "http://koraktor.de/steam-condenser", @@ -18,11 +18,10 @@ "wiki": "https://github.com/koraktor/steam-condenser/wiki" }, "require": { - "php": ">=5.4.0", - "monolog/monolog": "~1.10" + "php": "^7.2", + "monolog/monolog": "^2.0" }, "require-dev": { - "phpdocumentor/phpdocumentor": "~2.6.1", "phpunit/phpunit": "~4.1.3" }, "autoload": { diff --git a/lib/SteamCondenser.php b/lib/SteamCondenser.php index ff099e9..83453d8 100644 --- a/lib/SteamCondenser.php +++ b/lib/SteamCondenser.php @@ -12,9 +12,10 @@ namespace SteamCondenser; +use Monolog\Handler\StreamHandler; use Monolog\Logger; -const VERSION = '1.3.9'; +const VERSION = '1.3.11'; /** * Returns a Monolog logger with the given name @@ -23,5 +24,7 @@ * @return Logger The requested Monolog logger */ function getLogger($name) { - return new Logger($name); + $logger = new Logger($name); + $logger->pushHandler(new StreamHandler("php://stdout")); + return $logger; } From c0ba40c03729b85795c183770947a8b8caac23fa Mon Sep 17 00:00:00 2001 From: Zachary Craig Date: Mon, 4 May 2020 09:51:11 -0400 Subject: [PATCH 2/3] It's actually probably not appropriate for this PR to bump the version I'll leave that to the repo owner, if / when he decides to tag a release. --- composer.json | 2 +- lib/SteamCondenser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 0c137bd..8b4620d 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "koraktor/steam-condenser", - "version": "1.3.11", + "version": "1.3.10", "description": "The Steam Condenser is a library for querying the Steam Community, Source and GoldSrc game servers", "keywords": [ "steam", "query", "source", "goldsrc", "community", "webapi" ], "homepage": "http://koraktor.de/steam-condenser", diff --git a/lib/SteamCondenser.php b/lib/SteamCondenser.php index 83453d8..69bf23b 100644 --- a/lib/SteamCondenser.php +++ b/lib/SteamCondenser.php @@ -15,7 +15,7 @@ use Monolog\Handler\StreamHandler; use Monolog\Logger; -const VERSION = '1.3.11'; +const VERSION = '1.3.10'; /** * Returns a Monolog logger with the given name From bd46edf92ee3f5e093223379dea606bcd692378c Mon Sep 17 00:00:00 2001 From: Zachary Craig Date: Fri, 29 Jan 2021 13:19:46 -0500 Subject: [PATCH 3/3] Don't push any handlers by default Don't push any handlers to the logger, leave it to the user. --- lib/SteamCondenser.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/SteamCondenser.php b/lib/SteamCondenser.php index 69bf23b..d7179e6 100644 --- a/lib/SteamCondenser.php +++ b/lib/SteamCondenser.php @@ -24,7 +24,5 @@ * @return Logger The requested Monolog logger */ function getLogger($name) { - $logger = new Logger($name); - $logger->pushHandler(new StreamHandler("php://stdout")); - return $logger; + return new Logger($name); }