Skip to content

How to define FlagBag properties in api-platform? #233

@hafkenscheid

Description

@hafkenscheid

With the introduction symfony/symfony#52699 in symfony/property-info v6.4.9, there is a break with this bundle.

Defining a flagbag property like so (source )

   /** @var FlagBag<Permissions>|null */
    #[ORM\Column(type: 'permissions_flagbag', nullable: true)]
    private ?FlagBag $permissions;

Results in errors like 'Class "Elao\\Enum\\T" does not exist' in combination with api-platform (3.*).

Maybe my definition (using @var) is wrong, or is this a bug and should we define a FlagBag as a Collection?

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