Skip to content

If you try to create a new entity with the name "Class" the console crashes #305

@jger

Description

@jger

Symfony version(s) affected: x.y.z
Symfony Installer version 1.5.11

Description
If you try to create a new entity with the name "Class" the console crashes

How to reproduce
./bin/console ma:ent
Class name of the entity to create or update (e.g. GentleGnome):

Class
created: src/Entity/Class.php
created: src/Repository/ClassRepository.php

In Class.php line 10:

syntax error, unexpected 'Class' (T_CLASS), expecting identifier (T_STRING)

(and if you try again)
./bin/console ma:ent
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: syntax error, ...

Possible Solution
Don't allow the name Class for new entity
Additional context

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