Skip to content

fix: log the Throwable (not just its message) on service-reset failure - #1190

Open
rootsiemen wants to merge 1 commit into
crazy-goat:masterfrom
rootsiemen:fix-20261109-reset-logs-throwable
Open

rootsiemen wants to merge 1 commit into
crazy-goat:masterfrom
rootsiemen:fix-20261109-reset-logs-throwable

Conversation

@rootsiemen

Copy link
Copy Markdown
Contributor

Closes #1189

The reset-failure branch in SymfonyController::resetServices() logged only the exception message plus file/line, so PSR-3 loggers (e.g. Monolog) dropped the stack trace. It now logs the Throwable itself under the 'exception' context key, matching the sibling services_resetter resolution failure in the same class; the manual file/line keys are removed since the formatter derives them from the Throwable.

Test evidence:

  • tests/SymfonyControllerTest.php::testServicesResetterFailureIsLoggedAndDoesNotBreakNextRequest now asserts the logged context carries the same Throwable instance and no manual file/line keys, still over two requests (both 200, resetter runs once per request). The updated test failed on the old code (logged the message string) and passes after the fix.
  • tests/SymfonyControllerTest.php: 35 tests, 124 assertions, OK.
  • Full suite: 2914 tests, 9 pre-existing failures (composer-audit E2E + root-readable-file tests, all failing identically on pristine master), 44 skipped.
  • PHPStan level 8 and php-cs-fixer clean on the touched files; bin/check-changelog.php OK. Full bin/lint.sh fails only on pre-existing shellcheck/hadolint environment issues (hadolint not installed; SC2015 in untouched bin/worktree-done.sh).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] "Failed to reset services" logs the exception message instead of the Throwable

1 participant