10/16/2026
Doctrine Field Types in Seven Slides: MySQL to Doctrine
Which Doctrine type does that column become?
This is the lookup version of Doctrine field type mappings: tinyint is a boolean: seven slides, mostly one family of types each. Mappings and PHP types were checked against DBAL 4.5; older versions differ where a slide says so. Use the arrow keys or the Next button. With scripts off, the slides read in order below.
The full article has the full table, the reasoning behind the three mappings worth a second look, and where to check a type not listed.
MySQL to Doctrine types, slide by slide
Doctrine reads MySQL tinyint as booleanWhen Doctrine reads an existing schema it treats every MySQL tinyint as boolean. This is DBAL's own platform mapping, not a bug, checked against DBAL 4.5. Number typestinyint is the exception: it is boolean, not an integer. float becomes smallfloat from DBAL 4.1. What PHP gets backdecimal comes back as a string, and bigint can too. Checked against DBAL 4.5. Text and string typesTINYTEXT and LONGTEXT differ in maximum length, but Doctrine cannot tell them apart. Date and time typestimestamp and datetime both become datetime. Binary and set typesbinary and varbinary map to binary, not blob. simple_array is comma-joined text with no escaping, so a value containing a comma breaks it. Need a small integer?The first is almost always the right one for a new column. Use columnDefinition when the schema is not yours to change.
Where the rest is
The complete mapping table, the columnDefinition trade-offs and the questions this keeps raising are in the full article.
Researched and drafted with AI, then reviewed and edited by the site's editors.