Skip to content

Commit

Permalink
Allow (Array)ParameterType in QueryBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
hanishsingla authored and derrabus committed Feb 21, 2024
1 parent bc5efd4 commit 3eace16
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\DBAL\ArrayParameterType;
use Doctrine\DBAL\ParameterType;
use Doctrine\ORM\Internal\QueryType;
use Doctrine\ORM\Query\Expr;
use Doctrine\ORM\Query\Parameter;
Expand Down Expand Up @@ -428,12 +430,12 @@ public function getRootEntities(): array
* ->setParameter('user_id', 1);
* </code>
*
* @param string|int $key The parameter position or name.
* @param string|int|null $type ParameterType::* or \Doctrine\DBAL\Types\Type::* constant
* @param string|int $key The parameter position or name.
* @param ParameterType|ArrayParameterType|string|int|null $type ParameterType::*, ArrayParameterType::* or \Doctrine\DBAL\Types\Type::* constant
*
* @return $this
*/
public function setParameter(string|int $key, mixed $value, string|int|null $type = null): static
public function setParameter(string|int $key, mixed $value, ParameterType|ArrayParameterType|string|int|null $type = null): static
{
$existingParameter = $this->getParameter($key);

Expand Down

0 comments on commit 3eace16

Please sign in to comment.