Description
Environment detection logic is duplicated in both HandlerConfig and SecurityConfig. Should be extracted to a shared utility.
Implementation Details
- Create
EnvironmentDetector class in WebFiori\Error\Config
- Move detection logic (checking APP_ENV, display_errors, PRODUCTION constant) to this class
- Update
HandlerConfig and SecurityConfig to use EnvironmentDetector
- Consider caching the detected environment
Acceptance Criteria
Description
Environment detection logic is duplicated in both
HandlerConfigandSecurityConfig. Should be extracted to a shared utility.Implementation Details
EnvironmentDetectorclass inWebFiori\Error\ConfigHandlerConfigandSecurityConfigto useEnvironmentDetectorAcceptance Criteria