Skip to content

Introduce EnumCast Behavior#162

Merged
nilmerg merged 1 commit into
mainfrom
introduce-enumCast-behavior
Jul 15, 2026
Merged

Introduce EnumCast Behavior#162
nilmerg merged 1 commit into
mainfrom
introduce-enumCast-behavior

Conversation

@sukhwinder33445

@sukhwinder33445 sukhwinder33445 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

This PR introduces EnumCast, a behavior that converts backed enum database values to and from PHP enum instances.

This comment was marked as resolved.

This comment was marked as resolved.

@sukhwinder33445
sukhwinder33445 force-pushed the introduce-enumCast-behavior branch 3 times, most recently from 1b3fd5f to bd701c7 Compare June 25, 2026 08:52

This comment was marked as resolved.

This behavior helps to convert backed-enum database values to and from
PHP enum instances
@sukhwinder33445
sukhwinder33445 force-pushed the introduce-enumCast-behavior branch from bd701c7 to ae2ad98 Compare June 25, 2026 09:06
@nilmerg nilmerg added this to the v1.0.0 milestone Jun 25, 2026
@nilmerg
nilmerg merged commit 8dbaf9f into main Jul 15, 2026
13 checks passed
@nilmerg
nilmerg deleted the introduce-enumCast-behavior branch July 15, 2026 09:00
sukhwinder33445 added a commit to Icinga/icinga-notifications-web that referenced this pull request Jul 15, 2026
Introduces a Severity backed enum that centralises all severity logic —
backing values, translated labels, and icons — in one place, replacing
scattered string constants in Icons and inline match expressions in the
renderers. Wires up EnumCast on Incident and IncidentHistory so the
severity column is hydrated directly as a Severity instance, turning raw
string comparisons like `$item->severity === 'ok'` into type-safe
`$item->severity === Severity::OK`. Also updates the `SEVERITY_OK` icon
from `heart` to `circle-check` for visual consistency with the other
severity levels.

resolves #479
require Icinga/ipl-orm#162
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants