Question: Reserved words and quoting #7233

Closed
opened 2026-01-22 15:47:37 +01:00 by admin · 0 comments
Owner

Originally created by @boesing on GitHub (Oct 19, 2023).

Q A
Version any

Support Question

I've stumbled over https://www.doctrine-project.org/projects/doctrine-orm/en/2.16/reference/basic-mapping.html#quoting-reserved-words which says that one has to quote columns (and I guess also table names?) since doctrine does not quote these on its own.

What I wonder is, what is the purpose of the reserved words per PHP version then if its not to quote stuff which is reserved.
Is that documentation still up2date or did something change meanwhile?

Does this also apply to table names for MySQL 8?

#[Table(name:"`lead`")]

45941c67dd/src/Platforms/Keywords/MySQL80Keywords.php (L55)

Originally created by @boesing on GitHub (Oct 19, 2023). <!-- Fill in the relevant information below to help triage your issue. --> | Q | A |------------ | ----- | Version | any <!-- Before asking a question here, please try asking on Gitter or Slack first. Find out more about Doctrine support channels here: https://www.doctrine-project.org/community/ Keep in mind that GitHub is primarily an issue tracker. --> ### Support Question <!-- Describe the issue you are facing here. --> I've stumbled over https://www.doctrine-project.org/projects/doctrine-orm/en/2.16/reference/basic-mapping.html#quoting-reserved-words which says that one has to quote columns (and I guess also table names?) since doctrine does not quote these on its own. What I wonder is, what is the purpose of the reserved words per PHP version then if its not to quote stuff which is reserved. Is that documentation still up2date or did something change meanwhile? Does this also apply to table names for MySQL 8? ```php #[Table(name:"`lead`")] ``` https://github.com/doctrine/dbal/blob/45941c67dd0505dab2fb970786d93055b7cbd2b6/src/Platforms/Keywords/MySQL80Keywords.php#L55
admin added the Question label 2026-01-22 15:47:37 +01:00
admin closed this issue 2026-01-22 15:47:37 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7233