Skip to content

Using ENUMs as class property triggers BC failure #934

@alexmerlin

Description

@alexmerlin

Having a class property of type (Backed)Enum:

class SomeClass
{
    protected VisibilityEnum $visibility = VisibilityEnum::Public;
}

triggers backwardCompatibilityCheck error in my CI action:

Running roave-backward-compatibility-check --from=1.0 --install-development-dependencies

[BC] SKIPPED: An enum expression Namespace\VisibilityEnum::Public is not supported in class Namespace\Example in file /src/SomeClass.php (line 20)

Can I disable the BC check on specific files?
Or do I need to switch from using Enums to constants?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions