You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add three project-local PHPStan rules (ADR 011 / docs/logging.md) and
resolve every site they flag in the same change — zero baseline entries:
- NoSilentCatchRule (logging.silentCatch): flags a catch that neither
rethrows, logs via PSR-3, calls error_log/trigger_error, nor reports the
failure to the console (SymfonyStyle/OutputInterface). The console-output
exemption is in the rule, not a src/Command/ path exclusion, so a genuinely
empty catch in a command (unattended cron/Messenger) is still flagged.
- NoInterpolatedLogMessageRule (logging.interpolatedLogMessage): log message
must be a static string; variable data goes in the context array.
- ExceptionInContextMustUseExceptionKeyRule (logging.exceptionContextKey): a
Throwable in the context array must use the "exception" key.
Silent-catch migration: inject channel-bound loggers and log the swallowed
exception (AuthOidc/AuthScreenBind, ColiboFeedType, InstantBook, FeedService,
Feed/Theme/UserProvider), convert interpolated feed-type messages to static
message + exception context, and annotate the genuinely-intentional silences
(optional OIDC end-session URL, per-booking time parse, read-degradation in
FeedSourceProvider, the log-enrichment guard, validator violation, fixtures).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@@ -75,7 +79,7 @@ public function getUrls(Request $request): Response
75
79
// We allow end session endpoint to not be set.
76
80
try {
77
81
$endSessionUrl = $provider->getEndSessionUrl();
78
-
} catch (OpenIdConnectExceptionInterface) {
82
+
} catch (OpenIdConnectExceptionInterface) {// @phpstan-ignore logging.silentCatch (the end-session endpoint is optional; its absence is an expected configuration, not a failure)
} catch (\Exception$exception) {// @phpstan-ignore logging.silentCatch (dev-only fixture provider; exit() prints the message and aborts the fixtures load)
Copy file name to clipboardExpand all lines: src/Feed/BrndFeedType.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ private function parseBrndBooking(array $booking): array
166
166
if (false === $startDateTime) {
167
167
$startDateTime = null;
168
168
}
169
-
} catch (\ValueError) {
169
+
} catch (\ValueError) {// @phpstan-ignore logging.silentCatch (a malformed/unparseable start time is an expected per-booking data condition; null is a valid value for the optional field)
170
170
$startDateTime = null;
171
171
}
172
172
}
@@ -182,7 +182,7 @@ private function parseBrndBooking(array $booking): array
182
182
if (false === $endDateTime) {
183
183
$endDateTime = null;
184
184
}
185
-
} catch (\ValueError) {
185
+
} catch (\ValueError) {// @phpstan-ignore logging.silentCatch (a malformed/unparseable end time is an expected per-booking data condition; null is a valid value for the optional field)
0 commit comments