Hello, Dear Symfony team,
Let me propose a small improvement.
When running:
php bin/console make:entity User
the generated entity automatically uses the entity name as the table name (user).
However, in real-world projects table naming conventions often differ:
pluralized tables (users)
prefixed tables (app_user)
avoiding reserved SQL keywords (e.g. user in MySQL)
At the moment, developers must manually edit the generated entity and add:
#[ORM\Table(name: 'users')]
Proposal:
Add an optional interactive prompt during make:entity:
Table name (default: user):
Pressing Enter preserves current behavior: default lowercase entity name is prompted.
Best regards,
Vladimir Lasac
CC: @weaverryan @tucksaun @kbond @Nyholm
Hello, Dear Symfony team,
Let me propose a small improvement.
When running:
php bin/console make:entity User
the generated entity automatically uses the entity name as the table name (user).
However, in real-world projects table naming conventions often differ:
pluralized tables (users)
prefixed tables (app_user)
avoiding reserved SQL keywords (e.g. user in MySQL)
At the moment, developers must manually edit the generated entity and add:
#[ORM\Table(name: 'users')]
Proposal:
Add an optional interactive prompt during make:entity:
Table name (default: user):
Pressing Enter preserves current behavior: default lowercase entity name is prompted.
Best regards,
Vladimir Lasac
CC: @weaverryan @tucksaun @kbond @Nyholm