What problem does it solve?
OrangeHRM uses a single key/value settings table (hs_hr_config) for all application-level tunable settings, but inconsistent handling of this table leads to bugs from hardcoded string keys, incorrect type coercion, mixing up runtime and migration access paths, and accidentally storing domain data in the config table instead of proper entities.
Core Features & Use Cases
- Type-safe runtime config access: Provides guidance for using ConfigService and ConfigServiceTrait to read/write settings with proper type coercion, avoiding errors from string-stored booleans and numbers.
- Migration-safe config seeding: Guides correct use of ConfigHelper for installer and upgrade migrations, with guards to prevent overwriting operator-customized settings during re-runs.
- Config vs entity decision framework: Helps developers choose the correct storage location for new settings, avoiding performance issues from unindexed config value queries and improper storage of per-user or domain data.
Use case: When adding a new password policy feature flag to OrangeHRM, use this skill to add the typed accessor methods, seed the default value safely in a migration, and access the setting from runtime services without hardcoding the config key string.
Quick Start
Use the config skill to add a new typed getter and setter for the 'auth.password_policy.min_special_chars' setting in ConfigService, and seed its default value of '2' in the next migration script.