We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
->where()->setParameter()
Types::SIMPLE_ARRAY
When a field is defined as simple_array:
simple_array
#[ORM\Column(type: Types::SIMPLE_ARRAY, length: 255, nullable: true)] private array $foo = [];
... then using it in a Query Builder like this
$queryBuilder->where('a.foo = :array')->setParameter('array', $array, Types::SIMPLE_ARRAY);
... only works, if the third argument to setParameter() ($type) is given. If not, I'm getting this Doctrine\DBAL\Exception\ SyntaxErrorException:
setParameter()
$type
Doctrine\DBAL\Exception\ SyntaxErrorException
An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near ",": syntax error
Would it possible for PHPStan to check for this?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When a field is defined as
simple_array
:... then using it in a Query Builder like this
... only works, if the third argument to
setParameter()
($type
) is given.If not, I'm getting this
Doctrine\DBAL\Exception\ SyntaxErrorException
:Would it possible for PHPStan to check for this?
The text was updated successfully, but these errors were encountered: