Doctrine type inference for custom types #6775

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

Originally created by @TristanPouliquen on GitHub (Jul 1, 2021).

Hello,

I'm trying to use the new inference for Doctrine configuration, and I had a question I didn't find an answer to easily.

Doctrine automatically infers the Column type from the PHP attribute type for default types (eg: int, string, Datetime...).

Is there a way to register new type mappings?

For example, we are using Ramsey\UUID with its Doctrine support, would there be a way to configure Doctrine to register automatically a private Uuid $id column to @Column(type="uuid_binary_ordered_time")?

Originally created by @TristanPouliquen on GitHub (Jul 1, 2021). Hello, I'm trying to use the new inference for Doctrine configuration, and I had a question I didn't find an answer to easily. Doctrine automatically infers the Column type from the PHP attribute type for default types (eg: int, string, Datetime...). Is there a way to register new type mappings? For example, we are using Ramsey\UUID with [its Doctrine support](https://github.com/ramsey/uuid-doctrine), would there be a way to configure Doctrine to register automatically a `private Uuid $id` column to `@Column(type="uuid_binary_ordered_time")`?
admin closed this issue 2026-01-22 15:38:25 +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#6775