Jira issue originally created by user stefano.kowalke:
Why Doctrine maps any tinyint, regardless its length to boolean type. According to the MySQL Documentation only tinyint(1) is equivalent to boolean. I searched the web and found only out that this is the way how Doctrine it does but not why, so I have to assume its a bug.
Hope someone who knows Doctrine better could enlighten me :-)
Comment created by @deeky666:
[~stefano.kowalke] The length parameter for MySQL's integer does not have any effect unless you use it in conjunction with the ZEROFILL attribute. It does not have any meaning concerning min or max value and the storage requirements for that specific type but only specifies the display length for zerofill characters.
{quote}
M indicates the maximum display width for integer types. For floating-point and fixed-point types, M is the total number of digits that can be stored. For string types, M is the maximum length. The maximum allowable value of M depends on the data type.
{quote}
As MySQL does not have a native boolean type, Doctrine uses it to map it's own boolean type as it is the one that comes closest to a "boolean" type column. This is not a bug in Doctrine but an expected behaviour.
Hope I could clarify this. :)
Comment created by stefano.kowalke:
Hey Steve, thanks for your detailed informations. This helped me to understand the behavior and gave me a direction how to get more background informations.
Comment created by jonny827:
@Steve Muller - I believe Doctrine2 developers made a huge design flaw in doing this for the following reasons:
Love your application, thank you very much for being SPL friendly(data mapper) stable 2.x, part of symphony install by default/massive tutorial/knowledge base online, more contributors, active contributors, ROADMAP(they refuse to use one in PROPEL), easier to unit test. I spent weeks reading every word about both. Thank you for listening.
Issue was closed with resolution "Invalid"
Can we fix this, MySQL Platform\initializeDoctrineTypeMappings()\$doctrineTypeMapping
to change 'tinyint' => 'boolean', become 'tinyint' => 'smallint',
Thank you.
code preview:

Nope, because most users rely on tinyint to always be considered boolean.
Just use migrations from there on...
On 7 Apr 2017 6:37 a.m., "vafrcor" notifications@github.com wrote:
Can we fix this, MySQL Platform\initializeDoctrineTypeMappings
()\$doctrineTypeMapping
to change 'tinyint' => 'boolean', become 'tinyint' => 'smallint',
Thank you.code preview:
[image: screen shot 2017-04-07 at 11 33 44 am]
https://cloud.githubusercontent.com/assets/2148366/24785729/610e8f76-1b86-11e7-887e-a8a16fdc776f.png—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/doctrine/dbal/issues/2011#issuecomment-292434792, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAJakPP8so7HZHCgY5aPBEDYFfqkd3apks5rtb2VgaJpZM4M2cz7
.