-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
Bug Report
| Q | A |
|---|---|
| Version | 4.0 |
| Previous Version if the bug is a regression | 3.x |
Summary
The current code relies on column name set - see https://github.com/doctrine/dbal/blob/4.0.0/src/Platforms/AbstractPlatform.php#L163
This is not optimal in sense of OOP/layering as the AbstractPlatform::fromInvalidColumnType() method does not need column name in any sense.
Usecase: https://github.com/atk4/data/blob/af73bf478e/src/Persistence/Sql/Mysql/Query.php#L105
Current behavior
TypeError: Doctrine\DBAL\Exception\InvalidColumnDeclaration::fromInvalidColumnType(): Argument #1 ($columnName) must be of type string, null given, called in /__w/data/data/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php on line 206
/__w/data/data/vendor/doctrine/dbal/src/Exception/InvalidColumnDeclaration.php:14
/__w/data/data/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php:206
Expected behavior
No php type error.
How to reproduce
Type::getType('string')->getSQLDeclaration([], $this->connection->getDatabasePlatform());
Reactions are currently unavailable