[Bug]: type-hinting for ManyArgumentsExpression is wrong
SlyDave opened this issue · 1 comments
SlyDave commented
What happened?
Nothing major, the type hinting for ManyArgumentsExpression is currently:
* @param non-empty-array<int, \Illuminate\Contracts\Database\Query\Expression> $expressions
rather than
* @param non-empty-array<int, string|\Illuminate\Contracts\Database\Query\Expression> $expressions
This works but complains:
new Coalesce(['assignments.ends_at', 'contracts.starts_at']);
This works as expected
new Coalesce([new Expression('assignments.ends_at'), new Expression('contracts.starts_at')]))
ManyArgumentsExpression deliberately supports string or Expression and via use of the StringizeExpression trait
How to reproduce the bug
new Coalesce(['assignments.ends_at', 'contracts.starts_at']);
vs
new Coalesce([new Expression('assignments.ends_at'), new Expression('contracts.starts_at')]))
Package Version
0.7.0
PHP Version
8.1
Laravel Version
10.19
Which operating systems does with happen with?
Windows
Notes
No response
tpetry commented
Fixed with release 0.7.1
