Skip to content

Not importing traits on PHP native enums #425

@d8vjork

Description

@d8vjork

Having the following PHP enum as an example:

<?php

namespace App\Enums;

use OpenSoutheners\LaravelHelpers\Enums\Description;

enum UserWorkspaceRole: int
{
    use GetsAttributes; // this doesn't

    #[Description('Viewer')] // this import works fine
    case Viewer = 1;
}

Just try with whatever trait you have it fails as long as structure is of type enum (not happening to class)

OS: MacOS Sonoma (14.0)
Extension version: v1.40.14103 (stable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions