Skip to content

Commit

Permalink
Fix #98: Change log level from warning to debug for `LoginMiddlew…
Browse files Browse the repository at this point in the history
…are`
  • Loading branch information
viktorprogger committed Apr 22, 2024
1 parent 701d62c commit 6dbe0b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 2.2.0 under development

- Chg #96: Raise minimum PHP version to 8.1 (@vjik)
- Chg #98: Change log level from `warning` to `debug` for `LoginMiddleware` (@viktorprogger)
- Enh #93: Allow to use backed enumerations as permission name in `CurrentUser::can()` method (@vjik)

## 2.1.0 December 05, 2023
Expand Down
2 changes: 1 addition & 1 deletion src/Login/LoginMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
if ($identity instanceof IdentityInterface) {
$this->currentUser->login($identity);
} else {
$this->logger->warning(sprintf(
$this->logger->debug(sprintf(
'Unable to authenticate user by token %s. Identity not found.',
is_scalar($identity) ? ('"' . $identity . '"') : ('of type ' . get_debug_type($identity)),

Check warning on line 52 in src/Login/LoginMiddleware.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ if ($identity instanceof IdentityInterface) { $this->currentUser->login($identity); } else { - $this->logger->debug(sprintf('Unable to authenticate user by token %s. Identity not found.', is_scalar($identity) ? '"' . $identity . '"' : 'of type ' . get_debug_type($identity))); + $this->logger->debug(sprintf('Unable to authenticate user by token %s. Identity not found.', is_scalar($identity) ? $identity . '"' . '"' : 'of type ' . get_debug_type($identity))); } return $handler->handle($request); } }

Check warning on line 52 in src/Login/LoginMiddleware.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ if ($identity instanceof IdentityInterface) { $this->currentUser->login($identity); } else { - $this->logger->debug(sprintf('Unable to authenticate user by token %s. Identity not found.', is_scalar($identity) ? '"' . $identity . '"' : 'of type ' . get_debug_type($identity))); + $this->logger->debug(sprintf('Unable to authenticate user by token %s. Identity not found.', is_scalar($identity) ? $identity . '"' : 'of type ' . get_debug_type($identity))); } return $handler->handle($request); } }
));
Expand Down

0 comments on commit 6dbe0b9

Please sign in to comment.