mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Incomplete parameter type for index options #6732
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mbabker on GitHub (May 24, 2021).
With ORM 2.9, PHPStan gives a
Parameter $options of attribute class Doctrine\ORM\Mapping\Index constructor expects array<string>|null, array<string, array<int, string>> given.error when configuring an index using PHP 8 attributes and specifying an index length in the options array, it looks like the options are typehinted to a single level associative array.Not setting the
lengthsoption as an array produces aarray_filter(): Argument #1 ($array) must be of type array, string givenTypeError inDoctrine\DBAL\Schema\Index::hasSameColumnLengths().