for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\ORM\Annotation as ORM;
use Doctrine\Tests\OrmFunctionalTestCase;
/**
* @group GH-8106
*/
class GH8106Test extends OrmFunctionalTestCase
{
* {@inheritDoc}
protected function setUp() : void
parent::setUp();
$this->schemaTool->createSchema(
[
$this->em->getClassMetadata(GH8106User::class),
]
);
}
public function testIssue() : void
$user = new GH8106User();
$this->em->persist($user);
$this->em->flush();
$this->em->clear();
$qb = $this->em->createQueryBuilder();
$qb
->select('u')
->from(GH8106User::class, 'u')
->where('u.id = :id')
->setParameter(':id', 1)
->setParameter(':id', 1);
$result = $qb->getQuery()->getResult(); // should not throw QueryException
self::assertCount(1, $result);
/** @ORM\Entity */
class GH8106User
/** @ORM\Id @ORM\Column(type="integer") @ORM\GeneratedValue */
public $id;