Skip to content

Commit 409ed80

Browse files
committed
do not depend on the QueryBuilder from the ORM
1 parent ec781c9 commit 409ed80

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Doctrine\Common\Collections\Collection;
1515
use Doctrine\Common\Persistence\ManagerRegistry;
1616
use Doctrine\Common\Persistence\ObjectManager;
17-
use Doctrine\ORM\QueryBuilder;
1817
use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader;
1918
use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface;
2019
use Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader;
@@ -85,13 +84,16 @@ public static function createChoiceName($choice, $key, $value): string
8584
* For instance in ORM two query builders with an equal SQL string and
8685
* equal parameters are considered to be equal.
8786
*
87+
* @param object $queryBuilder A query builder, type declaration is not present here as there
88+
* is no common base class for the different implementations
89+
*
8890
* @return array|null Array with important QueryBuilder parts or null if
8991
* they can't be determined
9092
*
9193
* @internal This method is public to be usable as callback. It should not
9294
* be used in user code.
9395
*/
94-
public function getQueryBuilderPartsForCachingHash(QueryBuilder $queryBuilder): ?array
96+
public function getQueryBuilderPartsForCachingHash($queryBuilder): ?array
9597
{
9698
return null;
9799
}

src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ public function getBlockPrefix()
6868
* We consider two query builders with an equal SQL string and
6969
* equal parameters to be equal.
7070
*
71+
* @param QueryBuilder $queryBuilder
72+
*
7173
* @internal This method is public to be usable as callback. It should not
7274
* be used in user code.
7375
*/
74-
public function getQueryBuilderPartsForCachingHash(QueryBuilder $queryBuilder): ?array
76+
public function getQueryBuilderPartsForCachingHash($queryBuilder): ?array
7577
{
7678
return [
7779
$queryBuilder->getQuery()->getSQL(),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy