New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed annotations of parameter $columns in Table #3392
Conversation
@LukasVitek is this related to #3380? Could you double check if those |
Actually, yes, issue #3380 is very related. dbal/lib/Doctrine/DBAL/Schema/Table.php Line 274 in 4b4d44f
string .Should I therefore type of annotations to remake to string[] ?
|
Yes, please use |
@LukasVitek please squash and I’ll merge it. |
8d9eeed
to
2795a73
Compare
|
@LukasVitek please update |
74b89d0
to
438b052
Compare
Thank you @LukasVitek and @thewilkybarkid. |
I'm afraid this change breaks indexes with a fixed length. We have an index named if (is_numeric($columnName) && is_string($indexColOptions)) {
$columnName = $indexColOptions;
} |
@leofeyer can you please report a new issue? Got a test case for it? |
Fixes #3380.
Summary
Fixed annotations of parameter
$columns
in Table. Parameter$columns
is array of mixed, nowhere in the code does not treated with him as with an array of array.Before the fix the code, phpStan reported an error with this code:
Parameter #1 $columnNames of method Doctrine\DBAL\Schema\Table::addUniqueIndex() expects array<array>, array<int, string> given.