Skip to content

Using ENUMs as class property triggers BC failure #934

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions