chore: add diagnostic logging for debug mode verification
All checks were successful
Test Runner / test-basic (push) Successful in 8s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Successful in 1m33s

This temporary logging will help verify that:
- EnvironmentType is correctly detected as STAGING
- isDebugEnabled() returns false for STAGING
- ResponseErrorRenderer receives isDebugMode=false

Remove after verification is complete.
This commit is contained in:
2025-11-25 14:44:05 +01:00
parent f9063aa151
commit 520d082393
2 changed files with 5 additions and 0 deletions

View File

@@ -35,6 +35,8 @@ final readonly class ExceptionHandlingInitializer
?Logger $logger = null
): void {
$isDebugMode = $environmentType->isDebugEnabled();
// DIAGNOSTIC: Log debug mode determination (remove after verification)
error_log("[ExceptionHandlingInitializer] environmentType={$environmentType->value}, isDebugEnabled={$isDebugMode}");
// ConsoleOutput - only create if CLI context and not already provided
// For HTTP context, null is acceptable (ConsoleErrorRenderer won't be used)

View File

@@ -278,6 +278,9 @@ final readonly class ResponseErrorRenderer implements ErrorRenderer
);
$debugInfo = '';
// SECURITY FIX: Only show debug info in development mode
// Log to error_log for diagnostic purposes (can be removed after verification)
error_log("[ResponseErrorRenderer] isDebugMode={$this->isDebugMode}, APP_ENV=" . ($_ENV['APP_ENV'] ?? 'unknown'));
if ($this->isDebugMode) {
$debugInfo = $this->generateDebugSection($exception, $contextProvider);
}