Skip to content

Generating entity inside folder eg: Attr\Values, and entity with name Attr already exists #192

Closed
@TioLancaster

Description

@TioLancaster

I'm trying to generate an entity, using:

php bin/console make:entity

When in the Class name of the entity I put the following value: Attr\Values, and the Attr class already exists, so:
\App\Entity\Attr.php
\App\Entity\Attr\Values.php ( the new one I'm creating ), the following happens:

created: src/Entity/Attr/Values.php
created: src/Repository/Attr/ValuesRepository.php
2018-05-29T15:47:54+00:00 [error] Error thrown while running command "make:entity". Message: "Call to a member function getName() on string"
2018-05-29T15:47:54+00:00 [critical] Call to a member function getName() on string

In MakeEntity.php line 837:

Call to a member function getName() on string

The curious thing, is that the entity is created, nothing is changed on the Attr entity, and if run the command again to edit the entity Attr\Values, everything is fine, and everything works perfectly.

I'm on Windows 10, and running v1.5.0 of maker-bundle.

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