Skip to content

Regenerate doesn't work if there is an Embedded property in Entity #160

Closed
@welcoMattic

Description

@welcoMattic

Hi, thanks for maker-bundle, it's a very powerful tool! ❤️

I tried to regenerate an Entity that contains a @ORM\Embedded() property.

Here the steps to reproduce the bug:

  • Run make:entity with some fields
  • Add a @ORM\Embedded() property to this entity
  • Try to regenerate the entity getters/setters

💥

The output is:

$ bin/console make:entity --regenerate --overwrite

 This command will generate any missing methods (e.g. getters & setters) for a class or all classes in a namespace.

 To overwrite any existing methods, re-run this command with the --overwrite flag

 Enter a class or namespace to regenerate [App\Entity]:
 > App\Entity\Product


In ClassMetadataInfo.php line 3325:

  Notice: Trying to get property 'name' of non-object

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