Issue Bug Resolved

#111112Fluid RadioViewHelper does not support enum properties

Jan Kornblum 10/17/26, 11:10 updated 10/20/26, 12:45

Description

Problem

The Fluid RadioViewHelper does not correctly handle bound properties containing PHP enums (BackedEnum or UnitEnum). When the radio value matches the enum’s backing value or case name, the checked attribute is not rendered.

Example

Given a backed enum:

enum Answer: int
{
    case Yes = 1;
    case No = 2;
}

And a bound object property containing Answer::Yes:

<f:form.radio property="answer" value="1" />

Expected behavior

The radio input is rendered with checked=“checked”.

Actual behavior

The checked attribute is missing.

Additional context

The SelectViewHelper::getOptionValueScalar() already supports both BackedEnum (using ->value) and UnitEnum (using ->name).

The RadioViewHelper should handle enum properties consistently.

Reviews 2

History 14

  1. Jan Kornblum commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-20T12:45:17+00:00" > 10/20/26, 12:45 </span>

    Applied in changeset commit:446bb62ea73c8e8376c87671f5b874d7c1198ad4.