Tying to migrate to DBAL 4 (4.0.1) and in v3 we had Connection::PARAM_INT_ARRAY deprecated in favour of ArrayParameterType::INTEGER.
Then in v4 ArrayParameterType has been changed to enum, so it is a type itself.
Example query we have in the migrations:
$this->addSql('DELETE FROM books WHERE id IN (:ids)', ['ids' => $booksIds], ['ids' => ArrayParameterType::INTEGER]);
Current behavior
Exception:
Fatal error: Uncaught TypeError: Doctrine\Migrations\InlineParameterFormatter::formatParameter(): Argument #2 ($type) must be of type string|int, Doctrine\DBAL\ArrayParameterType given, called in [...]/vendor/doctrine/migrations/lib/Doctrine/Migrations/InlineParameterFormatter.php on line 46 and defined in [...]/vendor/doctrine/migrations/lib/Doctrine/Migrations/InlineParameterFormatter.php on line 56
TypeError: Doctrine\Migrations\InlineParameterFormatter::formatParameter(): Argument #2 ($type) must be of type string|int, Doctrine\DBAL\ArrayParameterType given, called in [...]/vendor/doctrine/migrations/lib/Doctrine/Migrations/InlineParameterFormatter.php on line 46 in [...]/vendor/doctrine/migrations/lib/Doctrine/Migrations/InlineParameterFormatter.php on line 56
Bug Report
Summary
Tying to migrate to DBAL 4 (4.0.1) and in v3 we had
Connection::PARAM_INT_ARRAY
deprecated in favour ofArrayParameterType::INTEGER
.Then in v4
ArrayParameterType
has been changed to enum, so it is a type itself.Example query we have in the migrations:
Current behavior
Exception:
How to reproduce
As I see the typehint here: https://github.com/doctrine/migrations/blob/3.7.x/lib/Doctrine/Migrations/InlineParameterFormatter.php#L56
is just
string|int $type
, so it would not work with DBAL 4.0It is kinda similar to: https://github.com/doctrine/dbal/issues/6309
Expected behavior
No errors.