MIR0713
BackedEnumCaseTypeMismatch
A backed enum case has a value that doesn’t match the enum’s backing type.
Example
Section titled “Example”<?phpenum Status: int { case Draft = 'draft'; // Error: string value for int-backed enum case Published = 1;}How to fix
Section titled “How to fix”Use values that match the enum’s backing type:
<?phpenum Status: int { case Draft = 0; case Published = 1;}
// Or use string-backed enumenum Status: string { case Draft = 'draft'; case Published = 'published';}