Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't spam into logs from LoginMiddleware #98

Merged
merged 5 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,9 +47,9 @@
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
Loading