Skip to content

Commit 1736ec1

Browse files
committed
fix(Logger): Make it compatible with LoggerInterface again
fixes #1269 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent d1eb504 commit 1736ec1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/Service/Logger.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function setCliOutput(OutputInterface $out): Logger {
3131
/**
3232
* @inheritDoc
3333
*/
34-
public function emergency($message, array $context = array()): void {
34+
public function emergency(string|\Stringable $message, array $context = array()): void {
3535
if (isset($this->cliOutput)) {
3636
$this->cliOutput->writeln((string)$message);
3737
}
@@ -41,7 +41,7 @@ public function emergency($message, array $context = array()): void {
4141
/**
4242
* @inheritDoc
4343
*/
44-
public function alert($message, array $context = array()): void {
44+
public function alert(string|\Stringable$message, array $context = array()): void {
4545
if (isset($this->cliOutput)) {
4646
$this->cliOutput->writeln((string)$message);
4747
}
@@ -51,7 +51,7 @@ public function alert($message, array $context = array()): void {
5151
/**
5252
* @inheritDoc
5353
*/
54-
public function critical($message, array $context = array()): void {
54+
public function critical(string|\Stringable $message, array $context = array()): void {
5555
if (isset($this->cliOutput)) {
5656
$this->cliOutput->writeln((string)$message);
5757
}
@@ -61,7 +61,7 @@ public function critical($message, array $context = array()): void {
6161
/**
6262
* @inheritDoc
6363
*/
64-
public function error($message, array $context = array()): void {
64+
public function error(string|\Stringable $message, array $context = array()): void {
6565
if (isset($this->cliOutput)) {
6666
$this->cliOutput->writeln((string)$message);
6767
}
@@ -71,7 +71,7 @@ public function error($message, array $context = array()): void {
7171
/**
7272
* @inheritDoc
7373
*/
74-
public function warning($message, array $context = array()): void {
74+
public function warning(string|\Stringable $message, array $context = array()): void {
7575
if (isset($this->cliOutput)) {
7676
$this->cliOutput->writeln((string)$message);
7777
}
@@ -81,7 +81,7 @@ public function warning($message, array $context = array()): void {
8181
/**
8282
* @inheritDoc
8383
*/
84-
public function notice($message, array $context = array()): void {
84+
public function notice(string|\Stringable $message, array $context = array()): void {
8585
if (isset($this->cliOutput)) {
8686
$this->cliOutput->writeln((string)$message);
8787
}
@@ -91,7 +91,7 @@ public function notice($message, array $context = array()): void {
9191
/**
9292
* @inheritDoc
9393
*/
94-
public function info($message, array $context = array()): void {
94+
public function info(string|\Stringable $message, array $context = array()): void {
9595
if (isset($this->cliOutput) && !$this->cliOutput->isQuiet()) {
9696
$this->cliOutput->writeln((string)$message);
9797
}
@@ -101,7 +101,7 @@ public function info($message, array $context = array()): void {
101101
/**
102102
* @inheritDoc
103103
*/
104-
public function debug($message, array $context = array()): void {
104+
public function debug(string|\Stringable $message, array $context = array()): void {
105105
if (isset($this->cliOutput) && !$this->cliOutput->isQuiet()) {
106106
$this->cliOutput->writeln((string)$message);
107107
}
@@ -111,7 +111,7 @@ public function debug($message, array $context = array()): void {
111111
/**
112112
* @inheritDoc
113113
*/
114-
public function log($level, $message, array $context = array()): void {
114+
public function log($level, string|\Stringable $message, array $context = array()): void {
115115
if (isset($this->cliOutput)) {
116116
$this->cliOutput->writeln((string)$message);
117117
}

0 commit comments

Comments
 (0)