Bug Report
Q |
A |
Version |
4.3.0 |
Previous Version if the bug is a regression |
x.y.z |
Summary
There is a typing issue in \Doctrine\DBAL\Schema\MySQLSchemaManager::_getPortableTableColumnDefinition()
,
when type is binary (probably char, varchar, and varbinary as well), $length
contains the length as string, that fails the types in the columns constructor.
Current behavior
When you call $connection->createSchemaManager()->$manager->listTableColumns($table)
on a table that has a binary column on MySql you get following error:
Doctrine\DBAL\Schema\Column::setLength(): Argument #1 ($length) must be of type ?int, string given
Expected behavior
listTableColumns()
should work as expected
How to reproduce
- create a table with binary column on MySQL
- call
SchemaManager::listTableColumns()
on that table