Skip to content

make:entity fails with entity name "Repository" #964

Open
@jzawadzki

Description

@jzawadzki

I know that Repository isn't THE BEST name for an entity, but I found that make:entity have problem with generation of such.

Maker creates Repository called Repository instead of RepositoryRepository and because of that, their use sections conflicts (same name of Entity and Repository)

Steps to reproduce:

symfony new test;
cd test;
composer req orm;
composer req maker;
php bin/console make:entity Repository

Result:

PHP Fatal error:  Cannot declare class App\Entity\Repository because the name is already in use in /home/jerzy/test/src/Entity/Repository.php on line 11

I see two possible solutions:

  1. Fix the bug
  2. Block "Repository" as reserved keyword

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions