config

Manage OrangeHRM hs_hr_config key-value settings via ConfigService and ConfigHelper.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone --skill config-snow-gift111
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: config
Source: https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone/tree/main/.agents/skills/config
Command: npx skills add https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone --skill config-snow-gift111

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? OrangeHRM stores application settings in the hs_hr_config key/value table, and developers need to know how to read, write, and seed these settings correctly without misusing the table for domain data or breaking migration re-runs. ## Core Features & Use Cases - Runtime access via ConfigService: Use ConfigServiceTrait with typed getters/setters and KEY_* constants instead of hardcoding string keys in services and controllers. - Migration-time access via ConfigHelper: Seed new config defaults inside migration up() methods with null-guards so re-runs never clobber operator customizations. - Decision guidance: Clear rules for when a setting belongs in hs_hr_config (feature flags, singletons, small JSON blobs) versus a proper entity (per-user settings, lists of records, queried values). - Use Case: When adding a new feature flag like widget.fancy_mode, follow the recipe to add the KEY_* constant and typed methods to ConfigService, seed the default in a migration, and read it from runtime code through ConfigServiceTrait. ## Quick Start Ask the assistant to add a new feature flag config key to OrangeHRM following the ConfigService and migration seeding conventions.

Frequently Asked Questions about config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new config setting in OrangeHRM?

Add a KEY_* constant and typed get/set methods to ConfigService, then seed the default in a migration using getConfigHelper()->setConfigValue(). Guard the seed with a getConfigValue($key) === null check so re-running the migration does not overwrite customized values.

What is the difference between ConfigService and ConfigHelper in OrangeHRM?

ConfigService is the runtime accessor with typed getters/setters, used via ConfigServiceTrait inside the DI container. ConfigHelper is the generic migration-time accessor that talks directly to the DBAL connection, since the installer runs without the full DI container or Doctrine ORM.

When should I use hs_hr_config versus a database entity?

Use hs_hr_config for single global settings like feature flags, instance metadata, or small JSON blobs. Use a proper entity for per-user settings, lists of structured records, frequently updated values, or anything queried by value, since the config table has no index on value.

Why is my boolean config value always truthy in PHP?

All hs_hr_config values are stored as strings, so 'false' from the database is truthy in a plain if check. Always use the typed ConfigService accessor or explicitly compare with === 'true' instead of relying on PHP truthiness.

What is the difference between Conf.php and hs_hr_config?

Conf.php is a file-based infrastructure config holding DB credentials, written once by the installer. hs_hr_config is the DB-backed application settings table read and written at runtime. New application settings always go in hs_hr_config, never in Conf.php.